Mysql Can't reach database server or port com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last
阿新 • • 發佈:2021-09-04
Can't reach database server or port
SQLState - 08S01
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.
==========解決============
開始以為是資料庫的配置問題,但是用mysql -hlocalhost -uroot -p卻可以正常連線。
後來百度搜索,說是需要加引數:useSSL=false
因為我的mysql是用的docker起的服務,仍然報錯,不能連線。
後來把localhost改成本機IP地址解決了:
jdbc:mysql://192.168.1.34/confluence?useSSL=false
參考:
https://blog.csdn.net/xiongshengwu/article/details/46981101
電信校園卡300一年500兩年20GB+10GB通用流量200分鐘通話30GB定向流量 v:13641304639
如果沒有一直堅持,也不會有質的飛躍,當生命有了限度,每個人的價值就會浮現。
船長部落格,期待共同交流提高!
本文如對您有幫助,記得點選右下邊小球【贊一下】,熱烈期待您關注部落格 n(*≧▽≦*)n