Recently using Navicat for MySQL access to the remote MySQL database, an error occurred, showing "1130-host ' xxx.xxx.xxx.xxx ' is not allowed to connect to this MySQL server".
The reason for the error is that the local IP (xxx.xxx.xxx.xxx) does not have permission to access the remote database .
The following enables local IP (xxx.xxx.xxx.xxx) access to the remote MySQL database.
The solution is as follows:
1, on the server side, open the cmd window, enter the MySQL installation directory bin, enter mysql-u root-p, and then enter the password after entering into the MySQL command line.
2, input use MySQL;
3. Enter select user,host from user;
You can see that there is only localhost in host. We need to add xxx.xxx.xxx.xxx to this.
4.
Add the following method:
Input
Grant all privileges on * * to [e-mail protected] "xxx.xxx.xxx.xxx" identified by "password";
This is equivalent to giving ip-xxx.xxx.xxx.xxx all the permissions, including remote access permissions.
And then enter
Flush privileges;
This is equivalent to reloading MySQL permissions, which must be there .
5. Re-enter select user,password,host from user;
You can see that the new IP has been added to the host.
6, again in the client with Navicat for MySQL access to the remote MySQL database, has been able to open the normal.
Reference Link: http://jingyan.baidu.com/article/b907e627b0e3b846e7891cc9.html
How to troubleshoot MySQL does not allow remote connection errors