Home > Database > Mysql Tutorial > body text

mysql-<SOS!!!> Communications link failureons

WBOY
Release: 2016-06-06 09:42:03
Original
1456 people have browsed it

mysqlhibernatefailure

自己做的第一个信息类网站,第一次访问主页时能够正确显示,但过几分钟后刷新该页面是就会报错:错误类型如下:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 1,649,969 milliseconds ago. The last packet sent successfully to the server was 2 milliseconds ago

.
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1127)
com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3715)
在网上查了一些解决方案,比如设置mysql参数“wait_timeout”等等都不奏效。求大神指点。。(ps: 用的是Hibernate访问数据库,MySQL版本为5.6的)

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template