mysql - 引用: MySql Connector/Net Authentication to host using method 'mysql_native_password' failed

标签 mysql mysql-connector connector-net

我花了很长时间试图弄清楚以下错误消息的含义以及为什么我无法连接 - 尽管任何其他方法都会成功。

Authentication to host 'x.x.x.x' for user 'product' using method 'mysql_native_password' failed with message: Access denied for user 'product'@'%' to database 'product'

错误消息的第一部分内容如下:

Authentication to host 'x.x.x.x' for user 'product' using method 'mysql_native_password' failed

您很困惑,请尝试检查您的密码样式。您可能甚至不会再看第二部分。

实际上,第一部分完全是胡说八道。它与错误完全无关!

继续第二部分和我的回答

最佳答案

错误消息的最后部分

"Access denied for user 'product'@'%' to database 'product'"

几乎可以表示与访问限制有关的任何内容。没有具体消息说明为什么不允许您。 因此,您必须检查以下任何一种可能性:

  • 您的用户名正确吗?
  • 您的密码正确吗?
  • 您使用新式密码吗?
  • 您连接的主机是否允许连接到服务器?
  • 您有权访问指定的数据库吗?
  • 您的连接字符串或数据库访问权限是否有任何拼写错误?

我希望这个列表内容广泛且有帮助 - 如果不是,请编辑或评论。

关于mysql - 引用: MySql Connector/Net Authentication to host using method 'mysql_native_password' failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22510457/

相关文章:

php - 如何检查数据库是否更新/修改/更改?

php - 如何在 2 个 PHP 文件之间发送输入类型电子邮件?

php - 如何获取每个类别的最新帖子

c# - 无法从 Visual Studio 2015 RC 中的 MySQL 数据库更新 EntityFramework 模型

mysql - 找不到适合 jdbc :mysql//localhost:3306/Test in Eclipse 的驱动程序

java - 让mysql和java一起工作

c# - 使用输出参数执行 MySqlCommand (StoredProcedure)

mysql - Asp.Net MySQL Connector/Net 连接池性能非常低

mysql - 如何获取每个月*at*的注册用户总数?

c# - 当 .NET 运行时关闭连接池中的 (My)SQL 连接时