新项目启动,报错,错误见下面三个图片
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.
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: 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.
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
解决办法
在项目配置文件yml的mysql的url 最后添加 &useSSL=false
jdbc:mysql://192.168.1.101:3306/xxx_admin?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
添加后就不再报错。
原因:当前jdk版本 jdk1.8.0_301
:“useSSL=true 是进行安全验证,一般通过证书或者令牌,useSSL=false就是通过账号密码进行连接,通常使用useSSL=false。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)