将spring boot项目的数据库改为MySQL8后,项目启动报错如下:

java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed

在application.yml配置数据库连接的url后面,加上:

&allowPublicKeyRetrieval=true

 

相关文章: