MySQL error 1130 hy000:host ' localhost ' solution _mysql

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.