xxx404
2022-9-9 10:28:04
发布在问答
mysql数据库无法连接
这是报错代码
- 无法连接数据库,具体原因:“Communications link failure
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.”。]
- g5.util.RTWrappedException: 无法连接数据库,具体原因:“Communications link failure
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.”。
- at g5.qry.sql.impl.SQLConnBuilder.build0(SQLConnBuilder.java:75) ~[product-20220506.jar:?]
- at g5.qry.sql.impl.JDBCConnBuilder.build(JDBCConnBuilder.java:66) ~[product-20220506.jar:?]
- at jdk.internal.reflect.GeneratedMethodAccessor7160.invoke(Unknown Source) ~[?:?]
- at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
- at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
- at g5.qry.driver.ConnectionProvider.getConn(ConnectionProvider.java:99) ~[product-20220506.jar:?]
- at g5.sv.qry.req.TestQryReq$CreateConnRunable.run(TestQryReq.java:254) ~[product-20220506.jar:?]
- at g5.thread.ThreadPoolWithChecker$GThread.run0(ThreadPoolWithChecker.java:214) ~[product-20220506.jar:?]
- at g5.thread.AbsThreadPool$PThread.run(AbsThreadPool.java:319) ~[product-20220506.jar:?]
- Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
- at jdk.internal.reflect.GeneratedConstructorAccessor658.newInstance(Unknown Source) ~[?:?]
- at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
- at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
- at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:988) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:341) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2251) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2284) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2083) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:806) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at jdk.internal.reflect.GeneratedConstructorAccessor37.newInstance(Unknown Source) ~[?:?]
- at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
- at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
- at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:410) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:328) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at java.sql.DriverManager.getConnection(DriverManager.java:677) ~[java.sql:?]
- at java.sql.DriverManager.getConnection(DriverManager.java:189) ~[java.sql:?]
- at g5.qry.sql.impl.SQLConnBuilder.build0(SQLConnBuilder.java:70) ~[product-20220506.jar:?]
- ... 8 more
- Caused by: java.net.ConnectException: Connection refused (Connection refused)
- at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
- at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[?:?]
- at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[?:?]
- at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[?:?]
- at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) ~[?:?]
- at java.net.Socket.connect(Socket.java:591) ~[?:?]
- at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:300) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2251) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2284) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2083) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:806) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at jdk.internal.reflect.GeneratedConstructorAccessor37.newInstance(Unknown Source) ~[?:?]
- at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
- at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
- at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:410) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:328) ~[mysql-connector-java-5.1.39-bin.jar:5.1.39]
- at java.sql.DriverManager.getConnection(DriverManager.java:677) ~[java.sql:?]
- at java.sql.DriverManager.getConnection(DriverManager.java:189) ~[java.sql:?]
- at g5.qry.sql.impl.SQLConnBuilder.build0(SQLConnBuilder.java:70) ~[product-20220506.jar:?]
- ... 8 more
复制代码
|
免责声明:本文不代表本站立场,且不构成任何建议,请谨慎对待。
版权声明:作者保留权利,不代表本站立场。