mysql数据库报错,请问如何处理?com.mysql.jdbc.CommunicationsException: Communications link fail..

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
MESSAGE: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
STACKTRACE:
java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2411)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2916)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at com.kaniwu.common.db.c3p0.JdbcUtils.query(JdbcUtils.java:122)
at com.kaniwu.common.DAO.impl.CommonDAOImpl.queryLoadInfo(CommonDAOImpl.java:58)
at com.kaniwu.common.process.CacheReloadThread.run(CacheReloadThread.java:77)
at java.lang.Thread.run(Thread.java:714)
** END NESTED EXCEPTION **
当前问题共有如下(1)个解决方案
  • franzhong
    franzhong
    丢包了?
    Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
上一篇:mysql一般索引和主键索引查询速度一样吗
下一篇:mysql测试时输入密码闪退