java - 连接Spring Boot-MySql : Public Key Retrieval is not allowed

标签 java mysql spring

我在今年六月初运行了我的一个应用程序,没有出现任何问题。今天再次尝试后,我在控制台中收到以下错误:

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/

相关文章:

java - 在 <form :select> in SpringMVC 中选择默认 boolean 值

php - 在 PHP 中使用 MySql 数据行值作为 html 表头和分区

java - 如何使用@XmlElement注释将REST输出映射到Spring Boot中的Dto,以便我可以获得所需格式的xml输出?

java - Spring Web MVC Hibernate 集成错误

java - 如何使用 ExecutorService 等待所有线程完成?

java - Maven SLF4J : Class path contains multiple SLF4J bindings

java - 字符串 - 它们在 Java 中如何工作?另外,不变性是什么意思?

php - 选择特定列 Zend Framework

php - 需要从基于子域的 Mysql 数据库中提取图像 url 列表,并将它们存储为列表

java - spring 4 - 找到接口(interface) org.springframework.test.context.TestContext,但是应该有类