The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
tomcat服务启动链接mysql报错:
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.
这个错误只是一个简单的mysql链接错误,它只是一脸单纯的告诉你:你链接mysql的链接地址错了,

就这一串, 你不要嘴硬,巴拉巴拉,有可能你本地服务可以起来,但是,换个服务或者换个环境,诶,起不来了,惊不惊喜,意不意外。
所以这个错误,不要看开始,开始的太简单,要拉到最后去看。

javax.net.ssl.SSLException: Unsupported record version Unknown-0.0
或者是
javax.net.ssl.SSLHandshakeException: No appropriate protocol
这个错误就很清晰了,
把url拿出来自己对一下:
jdbc:mysql://******/databasename?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
这个时候就很简单了
useSSL=true
改为:
useSSL=false
完
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
