一 问题描述
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet successfully received from the server was 0 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.
二 解决方法
看了一位老哥的办法,直接秒解决。
jdbc:mysql://111.111.111.111:3306/yyds?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC后面加上&useSSL=false,
即jdbc:mysql://111.111.111.111:3306/yyds?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useSSL=false
本文介绍了一种快速解决MySQL连接失败问题的方法,通过调整JDBC连接字符串中的参数useSSL为false来避免因SSL握手失败导致的通讯链接故障。
2659

被折叠的 条评论
为什么被折叠?



