防火墙开放3306端口:
[root@localhost ~]# firewall-cmd --zone=public --add-port=3306/tcp --permanent
重启防火墙:
[root@localhost ~]# systemctl restart firewalld.service
查询防火墙开放的端口:
[root@localhost ~]# firewall-cmd --list-ports