使用netsh命令。 具体如下 netsh advfirewall firewall add rule name="mysql" dir=in protocol=tcp localport=3306 action=allow 来源:https://www.cnblogs.com/dreamdale/p/11888522.html 标签 防火墙