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

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

Linux代码   Navicat MySQL连接Linux下MySQL的问题解决方案
  1. #chkconfig iptables off  
  2. #reboot  


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

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

Mysql代码   Navicat MySQL连接Linux下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 便可以成功了。

相关文章:

  • 2022-12-23
  • 2022-01-13
  • 2022-01-17
  • 2021-12-25
  • 2021-04-28
  • 2021-12-01
猜你喜欢
  • 2021-10-13
  • 2021-08-27
  • 2023-02-17
  • 2021-10-25
相关资源
相似解决方案