mysql8.x版本的数据库在连接的时候报错 java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
只要在url的后边加上 allowPublicKeyRetrieval=true 即可
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/springboot?useUnicode=true&characterEncoding=utf8&useSSL=FALSE&serverTimezone=CTT&allowPublicKeyRetrieval=true
java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
最新推荐文章于 2024-07-02 16:55:08 发布
本文介绍了解决使用Java连接MySQL 8.x版本数据库时出现的PublicKeyRetrievalisnotallowed错误的方法。通过在连接URL中添加参数allowPublicKeyRetrieval=true,可以避免此问题。
1286





