com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.ConnectExceptionMESSAGE: Connection timed out: connectSTACKTRACE:java.net.ConnectException: Connection timed out: connectat java.net.PlainSocketImpl.socketConnect(Native Method)at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)at java.net.Socket.connect(Socket.java:519)at java.net.Socket.connect(Socket.java:469)at java.net.Socket.(Socket.java:366)at java.net.Socket.(Socket.java:209)at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173)at com.mysql.jdbc.MysqlIO.(MysqlIO.java:267)at com.mysql.jdbc.Connection.createNewIO(Connection.java:2739)at com.mysql.jdbc.Connection.(Connection.java:1553)at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)at java.sql.DriverManager.getConnection(DriverManager.java:582)at java.sql.DriverManager.getConnection(DriverManager.java:185)at com.phg.kaohe.JDBCUtil.getConn(JDBCUtil.java:42)at com.phg.kaohe.JDBCUtil.main(JDBCUtil.java:14)** END NESTED EXCEPTION **Last packet sent to the server was 4 ms ago.at com.mysql.jdbc.Connection.createNewIO(Connection.java:2814)at com.mysql.jdbc.Connection.(Connection.java:1553)at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)at java.sql.DriverManager.getConnection(DriverManager.java:582)at java.sql.DriverManager.getConnection(DriverManager.java:185)at com.phg.kaohe.JDBCUtil.getConn(JDBCUtil.java:42)at com.phg.kaohe.JDBCUtil.main(JDBCUtil.java:14)
mysql jbdc远程_java jdbc远程连接别的电脑的mysql数据库报错
最新推荐文章于 2022-11-23 21:28:13 发布