Execute the following command to error
Mysql-uroot-h${hostip}-penter password:*********1130'$hostIp' is isn't allowed to connect to this MySQL server
Workaround:
1. Change the table method.
It may be that your account is not allowed to log on remotely, only on localhost. This time, as long as the computer on the localhost, log in to MySQL, change the "MySQL" Database in the "User" table "host", from "localhost" to "%"
Mysql-u root-pvmwaremysql> usemysql;mysql'%' 'root' ; MySQL>Select Host, user from user;
2. Authorization law.
For example, if you want to myuser use MyPassword to connect to a MySQL server from any host.
' MyUser '@'%'mypassword' with GRANT OPTION; FLUSH privileges;
If you want to allow users to connect to the MySQL server from a host myuser IP 192.168.1.6 and use MyPassword as the password
' MyUser '@'192.168.1.3'mypassword ' with GRANT OPTION; FLUSH privileges;
If you want to allow users to connect to the MySQL server's DK database myuser from the IP-192.168.1.6 host, and use MyPassword as the password
' MyUser '@'192.168.1.3'mypassword ' with GRANT OPTION; FLUSH privileges;
I used the first method, just started to find no, in the online check, less execute a statement mysql>flush rivileges make the changes take effect. It's okay.
Another way, but I did not personally tried, on the csdn.net, can look.
Run on the machine where MySQL is installed:
1. D:\mysql\bin\>mysql- h localhost- u // This should allow access to MySQL server 2 , mysql>grant all privileges on *. * to 'root' @'%' with GRANT // give any host access to data 3, Mysql>flush // Modify effective 4// exit MySQL server
This will allow you to log in as root on any other host!
Reference Address: http://www.cnblogs.com/xyzdw/archive/2011/08/11/2135227.html
Error: 1130-host allowed to connect to this MySQL server open MySQL remote connection does not use localhost