行业知识
用DG链接CentOS上的MySQL,报错
2026-11-18 02:54:34
来源:互联网转载
Failed Copy Search Error Troubleshooting DBMS: MySQL (no ver.) Case sensitivity: plain=mixed, delimited=exact Connection timed out: connect. Specify Version
()我是因为防火墙的原因。
下面是查看防火墙的命令行。
()sudo firewall-cmd --list-all
[root@192 ~]# sudo firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens33
sources:
services: dhcpv6-client ssh
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
可以看到在ports后面是空的。这表明防火墙并没有指定允许MySQL的端口(默认为3306)。在这种情况下,需要添加一个允许MySQL端口的规则
sudo firewall-cmd --add-port=3306/tcp --permanentsudo firewall-cmd --reload
再次查看防火墙,如下:
public (active)
target: default
icmp-block-inversion: no
interfaces: ens33
sources:
services: dhcpv6-client ssh
ports: 3306/tcp
上一篇:基金备案异常怎么办呢怎么解决