java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Zara
, 6 months ago
Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
via igniterealtime.org by Unknown author, 1 year ago
Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
via Stack Overflow by khl
, 2 years ago
Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
via grokbase.com by Unknown author, 2 years ago
Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
via Stack Overflow by Hei
, 2 years ago
Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
via hivmr.com by Unknown author, 1 year ago
Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
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.readPacket(MysqlIO.java:573)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1044)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2748)
at com.mysql.jdbc.Connection.(Connection.java:1553)
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 undefined.Main.connectToDB(Main.java:78)
at undefined.Main.main(Main.java:49)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
10 times, 4 months ago
Once, 4 months ago
4 times, 5 months ago
2 times, 5 months ago
19 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.