Navicat MySQL链接Linux下MySQL的问题解决方案

Error1: 2003:Can't connect to MySQL server on 'localhost' 

解决方法:关闭Linux的防火墙功能。 javascript

Linux代码    收藏代码
  1. #chkconfig iptables off  
  2. #reboot  


Error2: 1130 - Host'ClientIP' is not allowed to connect to this MySQL server 

解决方法:使用root用户登录Linux,更改允许登录的IP地址范围。 java

Mysql代码    收藏代码
  1. mysql>grant all privileges on *.* to 'root'@'%' identified by 'rootpasswd' with grant option;  


这段指令允许全部用root用户输入密码登录该mysql server,若是将'%' 换乘'192.168.1.124' ,那么只有'192.168.1.124'的主机能够登录。 

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

相关文章
相关标签/搜索