问题现象:
com.mysql.jdbc.CommunicationsException: The last packet successfully received from the server was58129 seconds ago.The last packet sent successfully to the server was 58129 seconds ago, which is longer than the server configured value of ‘wait_timeout’. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property ‘autoReconnect=true’ to avoid this problem.
解决办法:
mysql4.x版本 设置autoReconnect=true
mysql5以上的,修改my.ini配置文件,在mysqld下面添加以上两行,后面的数字是时间
[mysqld]
wait_timeout=31536000
interactive_timeout=31536000


![战神引擎传奇手游【黯晶灭世[白猪3.1]】最新整理Win系特色服务端+安卓苹果双端+GM授权后台+详细搭建教程](https://cdn.jxasp.com:9143/image/20251028/0F2E0E55BA6157D5F76B8125D0A511AC.jpg)
















