用户'root'@'localhost'拒绝访问(使用密码:YES) [英] Access denied for user 'root'@'localhost' (using password: YES)

查看:4872
本文介绍了用户'root'@'localhost'拒绝访问(使用密码:YES)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

连接问题,我在执行C#程序时列出了错误



使用方法'mysql_native_password验证用户'root'的主机'localhost' '失败的消息:用户'root'的访问被拒绝@'localhost'(使用密码:是)





请帮助

connection problem,I have listed the error when i execute C# program

Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'localhost' (using password: YES)


Please help

推荐答案

参考



连接失败的访问被拒绝的换用户rootlocalhost-使用-密码是 [<一个href =http://stackoverflow.com/questions/6445917/connect-failed-access-denied-for-user-rootlocalhost-using-password-yestarget =_ blanktitle =New Window> ^ ]


您尝试使用root用户名访问mysql数据库,但密码为空或密码错误。找出该数据库的有效用户名和密码,并相应地在连接字符串中更正它们。

顺便说一句,您不应该使用root帐户访问您的数据库,您应该创建一个单独的用户帐户,该帐户具有该数据库的有限权限。阅读:创建 - a-mysql-database-username-password-and-permissions-from-the-line-line [ ^ ]。
You have attempted to access the mysql database using root username but with empty or wrong password. Find out the valid username and password for that database and correct them in your connection string accordingly.
BTW, you should not use root account to access your database, you should create a separate user account with limited privileges for that database. Read this: create-a-mysql-database-username-password-and-permissions-from-the-command-line[^].


这篇关于用户'root'@'localhost'拒绝访问(使用密码:YES)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆