为了账号安全,请及时绑定邮箱和手机立即绑定

后面的表格出不来,代码看了挺久没看出错来,去百度也没有什么好的解决方法

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.

Caused by: 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.<init>(Socket.java:434)

at java.net.Socket.<init>(Socket.java:244)

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)

at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:294)

... 39 more

https://img1.sycdn.imooc.com//5d10dcc300014a3e15120655.jpg

正在回答

1 回答

mysql-jdbc连接jar包加了没有,或者mysql的服务有没有开。

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

后面的表格出不来,代码看了挺久没看出错来,去百度也没有什么好的解决方法

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信