我在今年六月初运行了我的一个应用程序,没有出现任何问题。今天再次尝试后,我在控制台中收到以下错误:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:不允许公钥检索
关于如何解决的任何想法?
我对此进行了研究,但没有发现任何特定于 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:不允许公钥检索
最佳答案
使用以下内容
jdbc:mysql://localhost:3306/payphone?useSSL=false&useJDBCComplaintTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
关于java - 连接Spring Boot-MySql : Public Key Retrieval is not allowed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57416600/