admin管理员组文章数量:1619183
启动程序时报错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.jdbc.exceptions.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 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数据库会拒绝访问。
本文标签: CommunicationsLINKfailure
版权声明:本文标题:Communications link failure解决 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1728783764a1173057.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论