【发布时间】:2019-12-16 09:37:48
【问题描述】:
我在今年 6 月初运行了我的一个应用程序,没有出现任何问题。今天再次尝试后,我在控制台中收到以下错误:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed
关于如何解决的任何想法?
我对此进行了研究,但没有发现任何特定于 Spring Boot 应用程序的内容。
applications.properties 中的设置:
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
spring.datasource.url = jdbc:mysql://localhost:3306/testdb?verifyServerCertificate=false&useSSL=false&requireSSL=false&useJDBCCompliantTimezoneShift=true&serverTimezone=UTC
spring.datasource.username = root
spring.datasource.password =
spring.jpa.show-sql = true
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto = update
spring.jpa.hibernate.naming.implicit-strategy = org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed
【问题讨论】:
-
查看这个帖子
https://stackoverflow.com/questions/50379839/connection-java-mysql-public-key-retrieval-is-not-allowed -
谢谢。我尝试添加
useSSL=false&allowPublicKeyRetrieval=true,但仍然无法解决问题。