java.io.EOFException

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

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web392

  • via Stack Overflow by Zara
    ,
  • via Stack Overflow by khl
    ,
  • Stack trace

    • 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.<init>(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 Main.connectToDB(Main.java:78) at Main.main(Main.java:49)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    ivanszkypeterivanszkypeter
    10 times, last one
    AxeloAxelo
    Once,
    linxiaolonglinxiaolong
    4 times, last one
    DoktorDoener666DoktorDoener666
    2 times, last one
    19 more bugmates