Error Access denied for user MySQL server?

浪子不回头ぞ 提交于 2019-12-12 01:32:55

问题


Error ERROR [HY000] [MySQL][ODBC 5.1 Driver]Access denied for user (using password: YES) ERROR [HY000] [MySQL][ODBC 5.1 Driver]Access denied for user (using password: YES)


回答1:


Make sure that your MySql server allows remote connections. If not you'll have to bind the database and user to the remote IP(s) You also need to check the servers firewall settings to make sure 3306 (or whatever you're using) is allowed and that incoming connections are permitted.




回答2:


Must be the semicolon in the password




回答3:


Try this: Connect your database using MySQL Workbench and try to run the following SQL statements:

GRANT ALL PRIVILEGES
    ON <database>.*
    TO '<user>'@'localhost' IDENTIFIED BY '<password>';
SET PASSWORD
    FOR <user>@localhost = PASSWORD('<password>');



回答4:


If nothing else works, it might be something you mistyped in the password etc. To fix, connect as root, and reset the database permissions, password and flush the privileges:

GRANT ALL PRIVILEGES
ON <database>.*
TO <user>@localhost IDENTIFIED BY '<password>';

SET PASSWORD
FOR <user>@localhost = PASSWORD('<password>');

Flush Priviliges;


来源:https://stackoverflow.com/questions/2539961/error-access-denied-for-user-mysql-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!