Error1: 2003:Can't connect to MySQL server on 'localhost'
解決方法:關閉Linux的防火牆功能。
- #chkconfig iptables off
- #reboot
Error2: 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;
這段指令容許所有用root用戶輸入密碼登陸該mysql server,如果將'%' 換乘'192.168.1.124' ,那么只有'192.168.1.124'的主機可以登陸。
現在重新用Navicat連接Linux mysql 便可以成功了。