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. Ubuntu12.04安装YouCompleteMe插件

    以前用的都是ctags+omnicomplete+acp的方式,这次换成clang自解析的方式尝试一把. 自从知道了Vundle,妈妈再也不用担心我麻烦地下插件了 0. 安装必要组件 sudo apt ...

  2. UC编程之线程

    线程--隶属于进程,是进程中的程序流.操作系统支持多进程,每个进程内部支持多线程.多线程并行(同时执行)代码. 进程--重量级的,每个进程都需要独立的内存空间. 线程--轻量级的,线程不拥有独立的内存 ...

  3. 如何在linux console中显示当前你在的branch?

    http://stackoverflow.com/questions/17333531/how-can-i-display-the-current-branch-and-folder-path-in- ...

  4. R语言中strptime返回值永远为NA的问题

    调用前加上以下代码,即可解决 Sys.setlocale("LC_TIME", "C");

  5. kafka迁移与扩容

    参考官网site: http://kafka.apache.org/documentation.html#basic_ops_cluster_expansion https://cwiki.apach ...

  6. PHP学习笔记04——数组

    <?php // 1.数组的声明,可以直接为数组元素赋值,也可以使用array函数声明数组 /* 索引数组:下标从0开始,依次递增 * 关联数组:字符串为下标 * */ //直接赋值声明数组,不 ...

  7. Ensemble Learning 之 Gradient Boosting 与 GBDT

    之前一篇写了关于基于权重的 Boosting 方法 Adaboost,本文主要讲述 Boosting 的另一种形式 Gradient Boosting ,在 Adaboost 中样本权重随着分类正确与 ...

  8. Android下监听Home键

    网上看到demo,亲测了以下机器和设备,均测试通过: 测试通过的手机: 1.华为荣耀3(Android 4.2.2) 2.小米2s(Android 4.1.1) 3.联想的手机 (Android2.3 ...

  9. Solr部署准备

    ---恢复内容开始--- 1.配置安装JDK1.7以上的版本 2.下载solr包 http://archive.apache.org/dist/lucene/solr/4.9.0/ 3.安装web容器 ...

  10. 无法启动ArcSDE服务

    ArcSDE服务启动错误:Error (-327), No ArcSDE server license found解决方法:>sdesetup -o update_key -d oracle10 ...