Home > Database > navicat > body text

What should I do if navicat reports error 1130 when connecting to mysql?

爱喝马黛茶的安东尼
Release: 2019-08-06 09:32:17
Original
5276 people have browsed it

What should I do if navicat reports error 1130 when connecting to mysql?

Deployed a program using Mysql as the database. sqlyog connected to the database of the non-local Mysql server. It was strange that it could not connect and reported a 1130 error.

ERROR 1130: Host 192.168.3.100 is not allowed to connect to this MySQL server
Copy after login

I guess it’s a problem of not being able to give remote connection user permissions. As a result, the problem can be solved by operating the mysql library like this. After logging into mysql locally, change the "host" item in the "user" table in the "mysql" database from "localhost" to '%'.

Related recommendations: "Navicat for mysql graphic tutorial"

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';
Copy after login

First sentence: Log in as the authorized user root.

Second sentence: Select the mysql library.

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

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

Fifth sentence: Refresh MySQL’s system permissions related tables.

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

Remember that the Mysql service needs to be restarted (to ensure that the modification is effective), otherwise the result of the modification may not be reflected.

It should be noted that:

1. The above commands need to be executed under the cmd command.

2. You need to switch to the deployment directory to execute these commands. cd x:\dir

3. MySql commands all end with ";".

4. When executing the first command, you need to manually enter the required password. Do not copy it. It is the password required by the deployment program.

The above is the detailed content of What should I do if navicat reports error 1130 when connecting to mysql?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template