新项目报:Caused by: javax.net.ssl.SSLHandshakeException:

新项目启动,报错,错误见下面三个图片
新项目报:Caused by: javax.net.ssl.SSLHandshakeException:_第1张图片

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: javax.net.ssl.SSLHandshakeException:_第2张图片

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:_第3张图片

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

新项目报:Caused by: javax.net.ssl.SSLHandshakeException:_第4张图片
添加后就不再报错。

原因:当前jdk版本 jdk1.8.0_301
:“useSSL=true 是进行安全验证,一般通过证书或者令牌,useSSL=false就是通过账号密码进行连接,通常使用useSSL=false。

你可能感兴趣的:(mysql,springboot,mysql,springboot)