结合网上提供的一些解决方案,还是不行。 检查防火墙是否对3306开放,没开放就对其开放 systemctl-cmd --zone=public --add-port=3306/tcp --permanent 之后便连接成功