当前位置:网站首页>The configuration that needs to be modified when switching between high and low versions of MySQL 5-8 (take aicode as an example here)
The configuration that needs to be modified when switching between high and low versions of MySQL 5-8 (take aicode as an example here)
2022-07-07 07:42:00 【if you never leave me, i will be with you till death do us apart】
An error is reported due to the conflict between the version of the database at the initial startup :
WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
My local environment is 8.0 Of MYsql Therefore, the configuration of the database is modified to 8.0
<mysql-connector-java.version>8.0.21</mysql-connector-java.version>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector-java.version}</version>
</dependency>
perhaps
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.21</version>
</dependency>
After the modification
Restart error :
Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
hold com.mysql.jdbc.Driver modify com.mysql.cj.jdbc.Driver
We make the following changes
Join this
driver-class-name: com.mysql.cj.jdbc.Driver

Could not create connection to database server. Attempted reconnect 3 times. Giving up.
1、 Will all driver-class-name Values are from com.mysql.jdbc.Driver It is amended as follows com.mysql.cj.jdbc.Driver( It said that )
2、 stay url Add a time zone parameter after the parameter of :&serverTimezone=UTC
3、 modify url The value in the connection parameter is updated to :zeroDateTimeBehavior=CONVERT_TO_NULL
spring:
profiles: dev
datasource:
#url: jdbc:mysql://localhost:3306/easycode?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
url: jdbc:mysql://localhost:3306/easycode?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=UTC
username: root
password: root
filters: log4j,wall,mergeStat
driver-class-name: com.mysql.cj.jdbc.Driver
Annotated is the previous ; New is modified ;
I hope I can help you ;
边栏推荐
- 抽絲剝繭C語言(高階)指針的進階
- @component(““)
- Implementing data dictionary with JSP custom tag
- Kbu1510-asemi power supply special 15A rectifier bridge kbu1510
- 1140_ SiCp learning notes_ Use Newton's method to solve the square root
- Flutter riverpod is comprehensively and deeply analyzed. Why is it officially recommended?
- 科技云报道:从Robot到Cobot,人机共融正在开创一个时代
- Leetcode-206. Reverse Linked List
- 《动手学深度学习》(四) -- 卷积神经网络 CNN
- 微博发布案例
猜你喜欢

今日现货白银操作建议

C language (high-level) data storage + Practice

A concurrent rule verification implementation

1089: highest order of factorial

考研失败,卷不进大厂,感觉没戏了

机器人技术创新与实践旧版本大纲

2022-07-06:以下go语言代码是否会panic?A:会;B:不会。 package main import “C“ func main() { var ch chan struct

1、 Go knowledge check and remedy + practical course notes youth training camp notes

我理想的软件测试人员发展状态

Outsourcing for four years, abandoned
随机推荐
【leetcode】1020. Number of enclaves
How do I get the last part of a string- How to get the last part of a string?
解决could not find or load the Qt platform plugin “xcb“in ““.
毕设-基于SSM大学生兼职平台系统
[cloud native] how to give full play to memory advantage of memory database
为什么要了解现货黄金走势?
Solution: could not find kf5 (missing: coreaddons dbusaddons doctools xmlgui)
【云原生】内存数据库如何发挥内存优势
[UTCTF2020]file header
Stockage et pratique des données en langage C (haut niveau)
1090: integer power (multi instance test)
misc ez_usb
Deep learning Flower Book + machine learning watermelon book electronic version I found
JS get all date or time stamps between two time stamps
leetcode:105. 从前序与中序遍历序列构造二叉树
Build personal website based on flask
vus.SSR在asynData函数中请求数据的注意事项
Resource create package method
nacos
面试官:你都了解哪些开发模型?