fanelephant

使用grant all privilege命令添加了远程访问账号,可是还是怎么都连不上,查了好多才知道,原来在linux下,需要开启允许对外访问的网络端口才行。

使用以下步骤即可开启3306端口:

/sbin/iptables -I INPUT -p tcp --dport 3306-j ACCEPT #开启3306端口 

/etc/rc.d/init.d/iptables save #保存配置 

/etc/rc.d/init.d/iptables restart #重启服务 

查看端口是否已经开放 

/etc/init.d/iptables status

 

 

 

分类:

技术点:

相关文章:

  • 2021-08-04
  • 2021-11-02
  • 2021-07-05
  • 2021-07-17
  • 2021-12-14
  • 2021-08-25
  • 2021-11-22
猜你喜欢
  • 2021-12-14
  • 2021-09-04
  • 2021-11-11
  • 2021-08-15
  • 2021-12-14
  • 2021-06-18
相关资源
相似解决方案