600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > Communications link failure解决

Communications link failure解决

时间:2023-02-11 11:26:37

相关推荐

Communications link failure解决

启动程序时报错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.

com.mysql.cj.municationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.17.jar:8.0.17]

网上各种方式都试了,还是没有解决,最后把jdk版本降了就解决了…

其他可能的原因:

1、MySQL数据服务没有开启导致连接失败

2、MySQL数据库设置成了外网不能访问,需要开启外网IP访问的功能。

3、可能是网络问题,导致连接不上,ping一下MySQL所在主机的IP

4、数据设置wait_timeout时间,在默认配置不改变的情况下,如果连续8小时内都没有访问数据库的操作,再次访问mysql数据库的时候,mysql数据库会拒绝访问。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。