Home >Database >navicat >What does 1130 mean when navicat appears?

What does 1130 mean when navicat appears?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-03 13:54:517862browse

What does 1130 mean when navicat appears?

When using Navicat to connect to a remote MySQL database, sometimes "Navicat for mysql 1130 error" will appear, indicating that the connection to the MySQL service is not allowed. Many people think that the firewall is causing trouble. In fact, turning off the firewall still cannot solve the problem. This tutorial will introduce how to solve the Navicat for MySQL 1130 error.

What does 1130 mean when navicat appears?

Problem description:

Error No.1130 Host '192.168.25.3' is not allowed to connect to this MySQL server

Related recommendations: "Navicat for mysql graphic tutorial"

Cause analysis:

MySQL has only one root user. After changing the root password, I selected MD5, after submitting and logging in again, the error message "Host 'localhost' is not allowed to connect to this MySQL server" will appear.

Solution:

1. How to change the table

It may be that your account does not allow remote login, only localhost. At this time, just log in to MySQL on the localhost computer and change For the "host" item in the "user" table of the "MySQL" database, change "localhost" to "%"

mysql -u root -pvmwaremysql>usemysql;mysql>update user set host = '%' where user ='root';mysql>select host, user from user;

2. Authorization method

For example, if myuser uses mypassword to connect to the mysql server from any host . GRANT ALL PRIVILEGES ON *.* TO IDENTIFIED BY 'mypassword' WITHGRANT OPTION;

If you want to allow user myuser to connect to the mysql server from the host with ip 192.168.1.3 and use mypassword as the password.

GRANT ALL PRIVILEGES ON *.* TO IDENTIFIED BY'mypassword' WITH GRANT OPTION;

If the table modification method does not work, you need to add a statement: mysql>FLUSH RIVILEGES to make the modification effective. That's it. .

3. Modify the permission method

Run on the machine where MySQL is installed:

d:/mysql/bin/>mysql - h localhost -u root //Enter the MySQL server

mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION //Give any host permission to access data

mysql>FLUSH PRIVILEGES //The modification takes effect

mysql>EXIT //Exit the MySQL server

This way you can log in as root on any other host.

The above is the detailed content of What does 1130 mean when navicat appears?. 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