当前位置:网站首页>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 ;
边栏推荐
- Outlier detection technology of time series data
- 【云原生】内存数据库如何发挥内存优势
- After 95, Alibaba P7 published the payroll: it's really fragrant to make up this
- 《动手学深度学习》(四) -- 卷积神经网络 CNN
- Flutter riverpod is comprehensively and deeply analyzed. Why is it officially recommended?
- 外包干了四年,废了...
- 一、Go知识查缺补漏+实战课程笔记 | 青训营笔记
- resource 创建包方式
- 【webrtc】m98 screen和window采集
- ASEMI整流桥RS210参数,RS210规格,RS210封装
猜你喜欢

面试结束后,被面试官在朋友圈吐槽了......

2022-07-06: will the following go language codes be panic? A: Meeting; B: No. package main import “C“ func main() { var ch chan struct

Leetcode-543. Diameter of Binary Tree

1140_ SiCp learning notes_ Use Newton's method to solve the square root

Outsourcing for four years, abandoned

L'étape avancée du pointeur de langage C (haut de gamme) pour l'enroulement des cocons

Wechat applet full stack development practice Chapter 3 Introduction and use of APIs commonly used in wechat applet development -- 3.9 introduction to network interface (IX) extending the request3 met

海思芯片(hi3516dv300)uboot镜像生成过程详解

The metauniverse of the platofarm farm continues to expand, with Dao governance as the core

Outlier detection technology of time series data
随机推荐
Docker compose start redis cluster
微信小程序中的路由跳转
After 95, Alibaba P7 published the payroll: it's really fragrant to make up this
Tongda injection 0day
普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
电商常规问题part1
解决could not find or load the Qt platform plugin “xcb“in ““.
Make a bat file for cleaning system garbage
IO stream file
BGP experiment (1)
今日现货白银操作建议
Convolutional neural network -- understanding of pooling
Blue Bridge Cup Netizen age (violence)
vus. Precautions for SSR requesting data in asyndata function
【经验分享】如何为visio扩展云服务图标
海思芯片(hi3516dv300)uboot镜像生成过程详解
基于Flask搭建个人网站
After the interview, the interviewer roast in the circle of friends
How can a 35 year old programmer build a technological moat?
How to * * labelimg