Error reporting restore:
Public Key Retrieval is not allowed
Background description
MySQL 8.0Springboot
Error reporting solution
Add the following to the URL of the project configuration file:
allowPublicKeyRetrieval=true
Detailed demonstration
Open the application.yaml file of springboot.
The application.xml file generated by springboot by default is only in different formats, which means the same and does not affect. The SSM project finds the URL configuration in mybatis, which is the same. Add allowpublickeyretrieval = true at the end of the URL. Note that you need to connect with “&”.
# Springboot application.yaml File
# DataSource Config
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/vueadmin?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: root
password: 123456
Read More:
- [Solved] Specified key was too long; max key length is 767 bytes
- [Fixed] Disgusting bug Error:Failed to Load project configuration: cannot parse filemessage: content is not allowed in the preface.
- Using mybatis statement.getGenreatedKeys(); usegeneratedkeys = “true”; using self incrementing primary key to get primary key value policy and Oracle do not support self incrementing, Oracle uses sequence
- How to Solve the Primary Key of mybatisPlus Inserted Data is too Large Issue
- [Solved] ClickHouse Error: Code: 62. DB::Exception: Syntax error (Multi-statements are not allowed): fai
- serviceimpl inherits generic public impl startup error: ClassCastException (Mybatis-plus version Issue)
- [Solved] SpringBoot Microservices: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded dat
- Problems and causes of Java’s main function format (public static void main (string args()))
- Mongodb java version 3.X, prompt “XXX (an encryption algorithm) is not available” when there is a user name and password
- [Solved] Kafka Error: is/are not present and missingTopicsFatal is true
- org.hibernate.exception.SQLGrammarException: could not extract ResultSet, Resolve MySQL 5.7.5 or above GROUP_BY is not supported
- [Solved] Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource
- Mybatis sets the primary key Auto-Increment error: No setter found for the keyProperty
- [Solved] JPA Create Sheet error at the First time: Cant DROP [xxx];check that column/key exists
- Spring Error: Transaction synchronization is not active
- Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could [Solved]
- [Solved] Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
- idea Error: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource
- The @value annotation of springboot adds the default value to solve the startup error caused by the non-existent key
- [Solved] Failed to configure a DataSource: ‘url‘ attribute is not specified…bug