firewall-cmd --list-ports
由于我的报的FirewallD is not running
systemctl status firewalld
显示防火墙未开启
systemctl start firewalld #关闭就是stop
在查看一下状态,是开的了
systemctl reload firewalld
firewall-cmd --permanent --zone=public --add-port=3306/tcp