smalldirector

CentOS 打开3306端口

在CentOS系统中防火墙默认是阻止3306端口的,我们要是想访问mysql数据库,我们需要这个端口,命令如下:

1 /sbin/iptables -I INPUT -p tcp --dport 3036 -j ACCEPT

我们需要保存我们的操作,命令如下:

1  /etc/rc.d/init.d/iptables save

此时我们可以查看端口的状态,命令如下:

1 /etc/init.d/iptables status

当然如果你打开其他端口也一样,只需要把这个端口号换乘你需要的端口号即可。

分类:

技术点:

相关文章:

  • 2021-09-27
  • 2021-09-25
  • 2021-09-30
  • 2021-12-28
  • 2021-10-02
  • 2021-09-30
  • 2021-12-19
猜你喜欢
  • 2021-09-30
  • 2022-01-02
  • 2021-09-30
  • 2022-02-02
  • 2021-09-30
  • 2021-11-19
相关资源
相似解决方案