mysql - Entity Framework 和逆向工程 Code First 和 MySQL : error access denied

标签 mysql asp.net entity-framework

我正在尝试将 Entity Framework 逆向工程代码优先与 MySQL DB 结合使用,我已经安装了这些:mysql-for-visualstudio-1.2.3 和 mysql-connector-net-6.9.3

与 MySQL DB 的连接似乎有效: enter image description here

我收到以下错误:

System.Data.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string. ---> MySql.Data.MySqlClient.MySqlException: Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'localhost' (using password: NO) ---> MySql.Data.MySqlClient.MySqlException: Access denied for user 'root'@'localhost' (using password: NO)

我尝试了很多在互联网上找到的解决方案,但没有任何效果。

这是我在 web.config 中的连接字符串:

   <add name="TFEContext" providerName="MySql.Data.MySqlClient" connectionString="server=localhost;
  port=3306;database=tfe_schema;uid=root;password=********"/>

最佳答案

经过 2 天的搜索,我选中了“保存我的密码”框,它可以正常工作,但访问 MySQL 服务器的密码是硬编码在 web.config 中的。 enter image description here

关于mysql - Entity Framework 和逆向工程 Code First 和 MySQL : error access denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25824959/

相关文章:

php - PHP 中的 MongoDb 更新

c# - 将 div 移动到另一个 div (ASP.NET MVC)

asp.net - 如何使用带有返回类型的 System.Action?

c# - Entity Framework 中的两列外键

c# - Entity Framework - 无法从使用中推断出来

php - 无法从 php 中的 while 循环获取值

mysql - phpMyAdmin 导入 .txt 文件?

c# - 在c#中使用Prepare语句的好处

asp.net - 如何在我的自定义 MvcRouteHandler 中模拟 IgnoreRoute

c# - 将导航属性映射到存储过程