首先测试linux下的端口有没有开通

/etc/init.d/iptables status

mysql本地连接远程连接不上

查看3306端口没有开通

使用以下命令开通

/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

/etc/init.d/iptables status      查看端口命令

mysql本地连接远程连接不上

再次访问还是连接不上我们查看mysql的远程访问有没有打开

本机登录mysql  

mysql本地连接远程连接不上

 运行以下命令打开远程连接

grant all privileges on *.* to root@'%' identified by 'password';

 

相关文章:

  • 2021-05-27
  • 2021-07-24
  • 2022-12-23
  • 2022-01-23
  • 2021-08-19
  • 2021-07-15
  • 2021-06-29
  • 2021-07-11
猜你喜欢
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2021-04-29
  • 2021-09-23
  • 2021-07-07
  • 2022-12-23
相关资源
相似解决方案