When a client using MySQL connects to a MySQL server, the following error occurs:
Error No. 1130
Host ' 192.168.0.14 ' isn't allowed to connect to this MySQL server
Workaround:
1. Change Table method. Your account may not be allowed to log in remotely, only in localhost. This time as long as the computer in localhost, login mysql, change the "MySQL" Database in the "User" table in the "host" item, from "localhost" renamed "%"
The code is as follows |
Copy Code |
Mysql-u Root-pvmwaremysql >use MySQL; Mysql>update User Set host = '% ' where user = ' root '; Mysql>select host, user from user; |
2. Authorization law. For example, you want to myuser use MyPassword to connect to a MySQL server from any host.
The code is as follows |
Copy Code |
Grant all privileges in *.* to ' myuser ' @ '% ' identified by ' MyPassword ' with GRANT OPTION; |
If you want to allow the user to connect to the MySQL server from the IP-192.168.1.3 host, and use MyPassword as the password myuser
The code is as follows |
Copy Code |
Grant all privileges in *.* to ' root ' @ ' 192.168.1.3 ' identified by ' MyPassword ' with GRANT OPTION; Grant all privileges in *.* to ' root ' @ ' 10.10.40.54 ' identified by ' 123456 ' with GRANT OPTION; mysql> flush Privileges; Mysql> exit |
Friendly hints, this situation is because the MySQL server for security reasons, the default allows only local logins to the database server, if not often we still turn off the function of the good.