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 GitHub by liuqilili
, 1 year ago
Unable to connect to SQL database
via GitHub by zgoethel12
, 2 years ago
via GitHub by Romaq
, 6 months ago
Unable to connect to SQL database
via GitHub by Gerolmed
, 1 year ago
Unable to connect to SQL database
java.net.ConnectException: Connection timed out: connect	at java.net.DualStackPlainSocketImpl.connect0(Native Method)	at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)	at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)	at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)	at java.net.AbstractPlainSocketImpl.connect(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:254)	at com.mysql.jdbc.MysqlIO.(MysqlIO.java:292)	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334)	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371)	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163)	at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:794)	at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)	at java.lang.reflect.Constructor.newInstance(Unknown Source)	at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)	at ru.tehkode.libs.org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)	at ru.tehkode.libs.org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)	at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)	at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)	at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)	at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)	at ru.tehkode.permissions.backends.sql.SQLBackend.getSQL(SQLBackend.java:245)	at ru.tehkode.permissions.backends.sql.SQLBackend.(SQLBackend.java:112)	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)	at java.lang.reflect.Constructor.newInstance(Unknown Source)	at ru.tehkode.permissions.backends.PermissionBackend.getBackend(PermissionBackend.java:392)	at ru.tehkode.permissions.backends.PermissionBackend.getBackend(PermissionBackend.java:367)	at ru.tehkode.permissions.PermissionManager.createBackend(PermissionManager.java:624)	at ru.tehkode.permissions.PermissionManager.setBackend(PermissionManager.java:606)	at ru.tehkode.permissions.PermissionManager.initBackend(PermissionManager.java:693)	at ru.tehkode.permissions.PermissionManager.(PermissionManager.java:67)	at ru.tehkode.permissions.bukkit.PermissionsEx.onEnable(PermissionsEx.java:175)	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340)	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405)	at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357)	at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317)	at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:408)	at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:372)	at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:327)	at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:267)	at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:561)	at java.lang.Thread.run(Unknown Source)