MySQL,MyBatis数据库连接问题,等待时间超时

时间:2019-12-31 03:37:19

标签: mysql mybatis

当我以前使用iBatis时,Pool.PringEnabled属性已成功运行并与MySql保持连接。

所以我找到了MyBatis属性poolPingQuery,但是不起作用。

需要其他设置吗?

这是错误消息

  

org.apache.ibatis.exceptions.PersistenceException:

### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 
The last packet successfully received from the server was 64,748,943 milliseconds ago.  
The last packet sent successfully to the server was 64,748,943 milliseconds ago. 
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.

0 个答案:

没有答案