Heim  >  Artikel  >  Datenbank  >  mysql-springjdbc 连接数据库,超过8小时没有连接,断开了与数据库的连接怎么办

mysql-springjdbc 连接数据库,超过8小时没有连接,断开了与数据库的连接怎么办

WBOY
WBOYOriginal
2016-09-28 08:38:13937Durchsuche

mysqljavaspringjdbc

如题,autoReconnect=true这个参数貌似在mysql5以后就不好使了,所以有时候访问接口的时候会出错,PreparedStatementCallback
The last packet successfully received from the server was 934,535,670 milliseconds ago. The last packet sent successfully to the server was 934,535,672 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
这个问题怎么解决

回复内容:

http://blog.csdn.net/rariki/article/details/41121745?utm_source=tuicool&utm_medium=referral

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn