java吧 关注:1,269,038贴子:12,775,772
  • 7回复贴,共1

java调用mysql时出现错误,怎么解决?

只看楼主收藏回复

错误如下
The last packet sent successfully to the server was 0 milliseconds ago. The driv
er has not received any packets from the server.com.mysql.jdbc.exceptions.jdbc4.
CommunicationsException: Communications link failure


IP属地:河南1楼2016-03-16 09:51回复
    中文意思是:最后一个包在0毫秒以前已经成功发送给服务器,但是驱动没有接收任何包,然后是两个jdbc异常,通信失败。我才刚学到这里,不太清楚,等楼下的发什么帮你,最好把源代码贴出来


    IP属地:四川来自Android客户端3楼2016-03-16 11:01
    收起回复
      2025-07-13 12:01:12
      广告
      你是不是使用了连接池


      IP属地:四川来自iPhone客户端6楼2016-03-16 21:19
      收起回复