1.查看防火墙状态 firewall-cmd --state 2.开启防火墙 systemctl start firewalld.service 3.关闭防火墙 systemctl stop firewalld.service 4.禁止防火墙开机自启 systemctl disable firewalld.service 5.打开指定端口号 firewall-cmd --zone=public --add-port=3306/tcp --permanent 参数说明: #–zone #作用域 #…