当我使用Eclipse在云服务器中连接Mysql时出现以下错误消息 到目前为止,这个问题尚未解决。 我不知道为什么会这样。使用Navicat,可以连接MySQL。
<div class='wrap'>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
<div class='c'></div>
</div>
“用户名”是当前库名还是“ root”名? “ PASSWORD”是当前的库密码还是“ root”密码?
** BEGIN NESTED EXCEPTION **
com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
MESSAGE: Can not read response from server. Expected to read 4,739,923 bytes, read 17 bytes before connection was unexpectedly lost.
STACKTRACE:
java.io.EOFException: Can not read response from server. Expected to read 4,739,923 bytes, read 17 bytes before connection was unexpectedly lost.
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:611)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1044)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2775)
at com.mysql.jdbc.Connection.(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at com.minlu.basedao.BaseDao.(BaseDao.java:33)
at com.minlu.basedao.MainCalss.main(MainCalss.java:5)
** END NESTED EXCEPTION **
Last packet sent to the server was 0 ms ago.
STACKTRACE:
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,739,923 bytes, read 17 bytes before connection was unexpectedly lost.
STACKTRACE:
java.io.EOFException: Can not read response from server. Expected to read 4,739,923 bytes, read 17 bytes before connection was unexpectedly lost.
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:611)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1044)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2775)
at com.mysql.jdbc.Connection.(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at com.minlu.basedao.BaseDao.(BaseDao.java:33)
at com.minlu.basedao.MainCalss.main(MainCalss.java:5)
** END NESTED EXCEPTION **
Last packet sent to the server was 0 ms ago.
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:641)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1044)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2775)
at com.mysql.jdbc.Connection.(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at com.minlu.basedao.BaseDao.(BaseDao.java:33)
at com.minlu.basedao.MainCalss.main(MainCalss.java:5)
** END NESTED EXCEPTION **