# Mysql数据库连接失败SSLException: Unsupported record version Unknown-0.0(连接其他服务器MysqlService)

文章目录

      • 问题描述:
      • 1.报错信息:
      • 2.解决方法:


问题描述:

mysql版本:5.7.*
jdk版本:1.8.*

1.报错信息:

Caused by: javax.net.ssl.SSLException: Unsupported record version Unknown-0.0
        at sun.security.ssl.InputRecord.checkRecordVersion(InputRecord.java:552) ~[na:1.8.0_171]
        at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:565) ~[na:1.8.0_171]
        at sun.security.ssl.InputRecord.read(InputRecord.java:529) ~[na:1.8.0_171]
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983) ~[na:1.8.0_171]
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385) ~[na:1.8.0_171]
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) ~[na:1.8.0_171]
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397) ~[na:1.8.0_171]
        at com.mysql.cj.protocol.ExportControlled.performTlsHandshake(ExportControlled.java:347) ~[mysql-connector-java-8.0.30.jar!/:8.0.30]
        at com.mysql.cj.protocol.StandardSocketFactory.performTlsHandshake(StandardSocketFactory.java:191) ~[mysql-connector-java-8.0.30.jar!/:8.0.30]
        at com.mysql.cj.protocol.a.NativeSocketConnection.performTlsHandshake(NativeSocketConnection.java:101) ~[mysql-connector-java-8.0.30.jar!/:8.0.30]
        at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:369) ~[mysql-connector-java-8.0.30.jar!/:8.0.30]
        ... 11 common frames omitted

# Mysql数据库连接失败SSLException: Unsupported record version Unknown-0.0(连接其他服务器MysqlService)_第1张图片

2.解决方法:

1.找到url:

image-20221012111618680

2.修改url

 url: jdbc:mysql://localhost/springboot?serverTimezone=UTC&characterEncoding=UTF-8&useSSL=false //关闭SSL

3.useSSL=false 关闭SSL

4.重新启动项目就可以了

你可能感兴趣的:(数据库,服务器,mysql)