mysql 端口 telnet 不通_3306端口不通,不一定是网络的问题

今天,开发需要申请一个账号:test@192.168.84.88 。连接时报了以下错误:

Warning: Using a password on the command line interface can be insecure.

ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.84.87' (111)

遇到连接失败,首先就是 ping 192.168.84.87

PING 192.168.84.87 (192.168.84.87) 56(84) bytes of data.

64 bytes from 192.168.84.87: icmp_seq=1 ttl=64 time=0.283 ms

64 bytes from 192.168.84.87: icmp_seq=2 ttl=64 time=0.712 ms

既然 ping 192.168.84.87没问题,接下来就是 telnet 3306 端口了

telnet 192.168.84.87 3306

Trying 192.168.84.87...

telnet: connect to address 192.168.84.87: Connection refused

发现端口不通了之后,就可以把锅丢给运维。然后安心的开其他事了。但,事情往往没那么简单,运维说他没有限制 3306 端口。这一会就尴尬了。

查看一下 3306 端口是否还在

netstat -nalp | grep 3306

tcp 0 0 127.0.0.1:41758 127.0.0.1:3306 TIME_WAIT -

tcp6 0 0 :::3306 :::* LIST


版权声明:本文为weixin_31221157原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。