1130-host '192.168.1.4' is not allowed to connect to this MySql server

 

解决方法:
 
如果想允许用户root使用密码123456从任何主机连接到mysql服务器

mysql>grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
mysql>flush privileges;

如果想允许用户root使用密码123456从ip为192.168.1.6的主机连接到mysql服务器

mysql>grant all privileges on *.* to 'root'@'192.168.1.6' identified by '123456' with grant

option;
mysql>flush privileges;
 

如果想允许用户root使用密码123456从ip为192.168.1.6的主机连接到mysql服务器的dk数据库

mysql>grant all privileges on dk.* to 'root'@'%' identified by '123456' with grant option;
mysql>flush privileges;