navicat没法链接Linux虚拟机中MySQL

Error: 1130 - Host’ClientIP’ is not allowed to connect to this MySQL server
解决方法:使用root用户登录Linux,更改允许登录的IP地址范围。
受权:
mysql>grant all privileges on . to ‘root’@’%’ identified by ‘rootpasswd’ with grant option;
grant 权限1,权限2,…权限n on 数据库名称.表名称 to 用户名@用户地址 identified by ‘链接口令’;mysql

例如链接受权:web

grant all privileges on *.* to root@192.168.*.* identified by '123';

—-192.168.. 为win7 IP地址 (本身查看)
—-123 为MySQL登录密码sql

Error: 2003:Can’t connect to MySQL server on ‘192.168..
解决方法:关闭Linux的防火墙功能。数据库

1. #chkconfig iptables off 
    2. #reboot 

如今从新用Navicat链接Linux MySQL即可以成功了。bash