EntityFramwork6连接MySql错误

使用EF6连接MySql产生Exception:

ProHub.ssdl(2,2) : 错误 0152: MySql.Data.MySqlClient”的 ADO.NET 提供程序的实体框架提供程序。请确保在应用程序配置文件的“entityFramework”节中注册了该提供程序。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkId=260882。

英文:

No Entity Framework provider found for 'MySql.Data.MySqlClient' ADO.NET provider

由于在EF5或更低版本,都OK,但是在EF6需要使用mysql connector 6.8.x,并且添加DbConfigurationTypeAttribute到对应的 DbContext:

[DbConfigurationType(typeof(MySql.Data.Entity.MySqlEFConfiguration))]
public class DemoContext : DbContext{}  MySqlEFConfiguration 存在于 MySql.Data.Entity.EF6.dll in 6.8.x以上版本。

EntityFramwork6连接MySql错误的更多相关文章

  1. 使用PyMySQL连接MySQL错误

    使用PyMySQL连接MySQL错误 之前写了一个小项目,今天突然想起来,准备优化一下,但是原本好好的项目竟然跑不起来了 emmm....我真的啥都没干呀 具体错误是这样的: Traceback (m ...

  2. 远程连接MySQL错误“plugin caching_sha2_password could not be loaded”的解决办法

    远程连接MySQL错误"plugin caching_sha2_password could not be loaded"的解决办法 问题描述: 今天在阿里云租了一个服务器,当我用 ...

  3. 连接Mysql错误 error 1042 can't get hostname for your address

    背景: 1.etc下的hosts文件有:     127.0.0.1   localhost 2.MySQL的my.ini配置文件:     [mysqld] 节点下已经加入以下两行代码 skip-n ...

  4. spring boot 连接mysql 错误The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one

    1.spring boot 整合mybatis 连接mysql时错误 The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or repr ...

  5. 解决MAC下PHP连接MYSQL错误Warning: mysql_connect(): No such file or directory in conn.php

    今天在mac上用php去连接mysql数据库,出现了 mac PHP Warning:  mysql_connect(): [2002] No such file... 详细例如以下所看到的: Dir ...

  6. 解决远程连接mysql错误1130

    Mysql远程连接Mysql服务器的数据库,错误代码是1130,ERROR 1130: Host xxx.xxx.xxx.xxx  is not allowed to connect to this ...

  7. 【Mysql】linux连接mysql错误解决方案

    1.源码 //connect-mysql.c #include <stdio.h> #include "/usr/include/mysql/mysql.h" int ...

  8. 连接MySQL错误“plugin caching_sha2_password could not be loaded”的解决办法

    MySQL新版默认使用caching_sha2_password作为身份验证插件,而旧版是使用mysql_native_password.当连接MySQL时报错“plugin caching_sha2 ...

  9. navicat远程连接mysql错误

    确保端口与服务正常. 如果都正常,那么服务有可能没有添加远程访问. 本人链接报错10060,那么问题出在阿里云的主机默认不开放3306端口,那么在安全组策略中加入对应的端口   登录后输入 use m ...

随机推荐

  1. 51nod1125 交换机器的最小代价

    跟做过的bzoj一道置换群的题几乎一样,只是数据范围大了点,那么就用map就好了... #include<cstdio> #include<cstring> #include& ...

  2. 【C#学习笔记】图片像素操作

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  3. 深入理解require/include的顺序

    在大型的Web项目中, include_path是一个模块化设计的根本中的根本(当然,现在也有很多基于autoload的设计, 这个不影响本文的探讨), 但是正是因为include_path, 经常会 ...

  4. linux上改变mysql数据文件的位置

    用软连接改变了/var/lib/mysql的位置,并设置好mysql.mysql的权限,但是发现还是不能启动. 发现/var/log/mysqld.log 150308 16:16:02 [Warni ...

  5. Android RecyclerView使用详解(二)

    在上一篇(RecyclerView使用详解(一))文章中简单的介绍了RecyclerView的基本用法,接下来要来讲讲RecyclerView的更多用法,要实现不同的功能效果,大部分都还是在于Recy ...

  6. 两个异步处理AsyncTask和Handler的优缺点

    AsyncTask和Handler对比 1 ) AsyncTask实现的原理,和适用的优缺点 AsyncTask,是android提供的轻量级的异步类,可以直接继承AsyncTask,在类中实现异步操 ...

  7. 基于HTTP 协议认证介绍与实现

    导言 一直对http 的头认证有兴趣,就是路由器的那种弹出对话框输入账号密码怎么实现一直不明白,最近,翻了一下http 协议,发现这是一个RFC 2617的实现,所以写篇文章介绍一下吧. Http基本 ...

  8. android去掉EditView的默认焦点问题

    在EditText的父级控件中找一个,设置成 <LinearLayout android:layout_width="0dp" android:layout_height=& ...

  9. apple-touch-icon,shortcut icon和icon的区别

    apple-touch-icon 可以了解到这是一个类似网站favicon的图标文件,用来在iphone和ipod上创建快捷键时使用. 这个文件应当是png格式,57x57像素大小,放在网站根目录之下 ...

  10. 线上redis服务内存异常分析。

    项目中,新增了一个统计功能,用来统计不同手机型号的每天访问pv,看了下redis2.6有个setbit的功能,于是打算尝尝鲜把 redis从2.4更新到了2.6 因为是租了vps.服务器的内存只有4g ...