Centos7 firewall to open port 3306

The default firewall CentOS7 as firewall, and the default is not open.

systemctl start firewalld # start friewall

systemctl status firewalld # View firewall start case

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

firewalld   # firewall-cmd --reload 重启 

firewall-cmd --query-port = 3306 / tcp port 3306 to see whether to open

Guess you like

Origin www.cnblogs.com/lab-zj/p/12023513.html