centos7

1.查看firewalld状态:systemctl status firewalld,如果是dead状态,即防火墙未开启。

解决FirewallD is not running问题

2.开启防火墙systemctl start firewalld

3.确认firewalld状态:systemctl status firewalld

解决FirewallD is not running问题

4.开放默认端口号 3306,出现success表示成功

firewall-cmd --permanent --zone=public --add-port=3306/tcp

解决FirewallD is not running问题

 

关闭防火墙:systemctl stop firewalld

 

 

https://www.cnblogs.com/kccdzz/p/8110143.html

相关文章: