com.mysql.jdbc.CommunicationsException: Communications link failure Last packet sent to the server was 1 ms ago.

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 coderanch.com by Unknown author, 1 year ago
Communications link failure Last packet sent to the server was 1 ms ago.
via coderanch.com by Unknown author, 1 year ago
Communications link failure Last packet sent to the server was 1 ms ago.
via coderanch.com by Unknown author, 1 year ago
Communications link failure Last packet sent to the server was 1 ms ago.
via Oracle Community by 843859, 1 year ago
Communications link failure Last packet sent to the server was 0 ms ago.
via Oracle Community by 843859, 5 months ago
Communications link failure Last packet sent to the server was 33 ms ago.
via Stack Overflow by Tobias Wiesenthal
, 1 year ago
Communications link failure Last packet sent to the server was 0 ms ago.
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2043)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:723)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:298)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
at java.sql.DriverManager.getConnection(Unknown Source)
at test.DBConnection.getConnection(DBConnection.java:56)
at test.Test.main(Test.java:14)

Users with the same issue

8 times, 4 hours ago
14 times, 7 hours ago
552 times, 12 hours ago
11 times, 3 days ago
26943 times, 3 days ago

Write tip

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