Home>Article>Database> How to solve Navicat connection 1130 error

How to solve Navicat connection 1130 error

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼 Original
2019-08-13 17:14:43 9874browse

How to solve Navicat connection 1130 error

The error code is 1130, ERROR 1130: Host X.X.X.X is not allowed to connect to this MySQL server

How to solve Navicat connection 1130 error

The guess is that it cannot be connected User permissions issue for remote connections. As a result, the problem can be solved by operating the mysql library like this.

After logging into mysql on the server, change the "host" item in the "user" table in the "mysql" database and rename "localhost" to '%'.

Related recommendations: "Navicat for mysql graphic tutorial"

The following is a SQL statement to solve the problem:

mysql -u root -p mysql;use mysql; mysql;select 'host' from user where user='root'; mysql;update user set host = '%' where user ='root'; mysql;flush privileges; mysql;select 'host' from user where user='root';

The first sentence: Yes Log in as the authorized user root;

Second sentence: Select the mysql library;

Third sentence: Check the host value of the user table in the mysql library (that is, the host/IP for connection access name);

Fourth sentence: Modify the host value (add the host/IP address with wildcard % content), of course, you can also directly add the IP address;

Fifth sentence: Refresh MySQL System permission related tables;

Sixth sentence: When checking the user table again, there are modifications.

Restart the mysql service to complete.

The above is the detailed content of How to solve Navicat connection 1130 error. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn