The first problem arises
Then add port 3306 to the firewall
/sbin/iptables-i input-p TCP--dport 3306-j ACCEPT
There's another problem.
ERROR 1130:host ' 192.168.1.3 ' isn't allowed to connect to this MySQL server
1, after the computer log in MySQL, the "MySQL" Database in the "User" table "host", from "localhost" to the '% '.
The code is as follows |
Copy Code |
Mysql> Mysql>use MySQL; Mysql>select ' host ' from user where user= ' root '; |
#查看mysql库中的user表的host值 (Host/IP name for connection access)
The code is as follows |
Copy Code |
Mysql>update User Set host = '% ' where user = ' root '; |
#修改host值 (Increase the host/IP address as a wildcard%, and of course, you can also directly add a specific address if error 1062 (23000) occurs when you execute the UPDATE statement : Duplicate entry '%-root ' for key ' PRIMARY ' error, requires select host from user where user = ' root ';
Check to see if the host has a% value, and if so, directly execute the following flush privileges;
The code is as follows |
Copy Code |
Mysql>flush privileges; Mysql>select host,user from user where user= ' root '; Mysql>quit |
New server installed MySQL using Navcat connection not on