当前位置:
首页 >
行业知识 >
java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed的解决
行业知识
java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed的解决
2026-10-25 10:50:34
来源:互联网转载
一、异常的产生
java.sql.SQLNonTransientConnectionException:
()Public Key Retrieval is not allowed 表明正在使用的 JDBC 驱动在尝试建立数据库连接时,无法通过公钥检索方式获取服务器的SSL证书。通常发生在MySQL8等高版本上
二、解决
配置数据库信息
()1.url配置了SSL
2.url中添加 allowPublicKeyRetrieval=true
url: jdbc:mysql://localhost:3306/study?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
上一篇:王者荣耀怎么交换服务器?