Lost connection to MySQL server at 'reading initial communication packet', system error: 111 (MySQL
2018-01-31 09:21
1546 查看
DataClient.cpp: 220|get_all_msgpolicy; SQLException [TCS_Mysql::connect]:
mysql_real_connect:
Lost connection to MySQL server at 'reading initial communication packet', system error: 111 (MySQL error code: 0 )
可能原因如下:
1.主机IP或端口配置错误
2.防火墙阻止连接
3.数据库服务不可用
检测方法:
1. telnet IP Port
telnet 192.168.1.92 3306
如果正常,说明是程序配置问题
2.检查应用数据源配置
由于之前应用访问数据库是正常的,在应用升级后出现的问题。
把升级前和升级后的文件比对一下,就看出了问题。
$ diff a.xml a.xmlbak
发现数据库端口配置错误,修改后应用恢复正常。
mysql_real_connect:
Lost connection to MySQL server at 'reading initial communication packet', system error: 111 (MySQL error code: 0 )
可能原因如下:
1.主机IP或端口配置错误
2.防火墙阻止连接
3.数据库服务不可用
检测方法:
1. telnet IP Port
telnet 192.168.1.92 3306
如果正常,说明是程序配置问题
2.检查应用数据源配置
由于之前应用访问数据库是正常的,在应用升级后出现的问题。
把升级前和升级后的文件比对一下,就看出了问题。
$ diff a.xml a.xmlbak
发现数据库端口配置错误,修改后应用恢复正常。
相关文章推荐
- Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111
- Lost connection to MySQL server at ‘reading initial communication packet', system error: 0
- lost connection to mysql server at 'reading initial communication packet',system error:2
- 遇见Lost connection to MySQL server at 'reading initial communication packet',system error:0的解决办法
- MySql Lost connection to MySQL server at 'reading initial communication packet', system error: 0
- Lost connection to MySQL server at ‘reading initial communication packet', system error: 0 mysql远程连接
- MySQL远程连接丢失问题解决方法Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
- 连接mysql出现Lost connection to MySQL server at 'reading initial communication packet', system error: 0
- 有关Mysql出现Lost connection to MySQL server at 'reading initial communication packet', system error: 0的一个解决方案
- 2013 - Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
- Lost connection to MySQL server at 'reading initial communication packet' 错误解决
- Lost connection to MySQL server at 'reading initial communication packet et system error:0
- Lost connection to MySQL server at ‘reading initial communication packet’
- Lost connection to MySQL server at 'waiting for initial communication packet', system error: 0
- [Err] [Dtf] 2013 - Lost connection to MySQL server at 'reading initial communication packet', 复制数据问题
- MySQL error: 2013, “Lost connection to MySQL server at 'reading initial communication packet', syste
- ubuntu下连接mysql时报错:Lost connection to MySQL server at 'reading initial communication packet', system
- Lost connection to MySQL server at ‘reading initial communication packet
- Lost connection to MySQL server at ‘reading initial communication packet