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

Samebug tips

  1. ,
    Expert tip

    Firewall might be blocking your connection, or MySQL it's not running on your server machine.

  2. ,
    Expert tip

    Check if you have started your server, or if your server is set to listen to the port you're trying to connect and is waiting to accept connections and check if the firewall isn't blocking your connection.

Solutions on the web

via Stack Overflow by Anıl Şenocak
, 1 year ago
Communications link failure Last packet sent to the server was 0 ms ago.
via Oracle Community by 843859, 10 months ago
Communications link failure Last packet sent to the server was 0 ms ago.
via Stack Overflow by code4fun
, 2 years ago
Communications link failure Last packet sent to the server was 0 ms ago.
via Stack Overflow by user2135874
, 2 years ago
Communications link failure Last packet sent to the server was 0 ms ago.
via Stack Overflow by Sujith R
, 2 years ago
Communications link failure Last packet sent to the server was 328 ms ago.
java.net.ConnectException: Connection refused: connect	at java.net.DualStackPlainSocketImpl.connect0(Native Method)	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)	at java.net.Socket.connect(Socket.java:589)	at java.net.Socket.connect(Socket.java:538)	at java.net.Socket.(Socket.java:434)	at java.net.Socket.(Socket.java:244)	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:168)	at com.mysql.jdbc.MysqlIO.(MysqlIO.java:262)	at com.mysql.jdbc.Connection.createNewIO(Connection.java:1926)	at com.mysql.jdbc.Connection.(Connection.java:716)	at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)	at com.mysql.jdbc.Util.handleNewInstance(Util.java:353)	at com.mysql.jdbc.Connection.getInstance(Connection.java:295)	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)	at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:328)	at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)	at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)	at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:96)	at org.eclipse.datatools.enablement.internal.mysql.connection.JDBCMySQLConnectionFactory.createConnection(JDBCMySQLConnectionFactory.java:28)	at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)	at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)	at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)	at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)