MySQL数据库远程连接配置 使用ifconfig命令查看服务器的IP地址如下: [ root@bogon ~ ] # ifconfig ens33: flags = 4163 < UP,BROADCAST,RUNNING,MULTICAST > mtu 1500 inet 192.168.1.11 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::24de:dca1:a1fb:f609 prefixlen 64 scopeid 0x20 < link > ether 00:0c:29:3e:7b:d2 txqueuelen 1000 ( Ethernet ) RX packets 28577 bytes 8446017 ( 8.0 MiB ) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4881 bytes 470355 ( 459.3 KiB ) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 把MySQL的3306端口加入防火墙(以CentOS7为例),命令如下: [ root@bogon ~ ] # firewall-cmd --add-port 3306/tcp success [