com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

mysql﹥ show global variables like 'wait_timeout';
+---------------+---------+
| Variable_name | Value |
+---------------+---------+
| wait_timeout | 28800 |
+---------------+---------+
1 row in set (0.00 sec)

修改mysql5的配置文件my.ini增加一行:

wait_timeout=1814400
需要重新启动mysql5。
linux系统配置文件:/etc/my.cnf
测试显示问题解决了。

原文地址:https://www.cnblogs.com/xujj/p/2815671.html