ERROR 1130 (HY000): Host ' localhost ' isn't allowed to connect to this MySQL server www.jb51.net
Reason for the occurrence:
MySQL has only one root user, after modifying the root password, select MD5, and submit it again
Login appears "Host ' localhost ' is not allowed to connect to this MySQL server ..."
Try the user table in another MySQL library, overwrite, no, I guess it's different version.
Solve:
Edit My.ini
In the paragraph of [mysqld], add a sentence: Skip-grant-tables
For example:
Java code
Copy Code code as follows:
[Mysqld]
Datadir=/var/lib/mysql
Socket=/var/lib/mysql/mysql.sock
Skip-name-resolve
Skip-grant-tables
The purpose is to:
Bypass MySQL access control, anyone can access the console as an administrator into the MySQL database.
Note that the MySQL server will not take effect until the password has been modified.
Restart the MySQL service!