Several Differences Between MySQL 5.x and MySQL 8.0.X The differences in application.properties are commented out and correspond to the 8.0.x version. spring.datasource.driver-class-name=com.mysql.jdbc.Driver //spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.username=root //Your username. Default is root spring.datasource.password=123456//Your password. Default is root spring.datasource.url=jdbc:mysql://127.0.0.1:3306/sell?characterEncoding=utf-8&useSSL=false //spring.datasource.url=jdbc:mysql://127.0.0.1:3306/sell?useUnicode=true&characterEncoding=UTF8&useSSL=false&serverTimezone=UTC spring.jpa.show-sql=true server.context-path=/sell //server.servlet.context-path=/sell Upgrading MySql5.x to MySql8.x is very simple. Generally speaking, it only takes two steps. 1. Replace the new jar package <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.18</version> </dependency> 2. Replace the new driver class com.mysql.cj.jdbc.Driver 3. Replace the new URL connection and specify the time zone # Set the time to GMT8 serverTimezone=GMT%2B8 # Full URL String url="jdbc:mysql://"+dbHost+":"+dbPort+"/"+dbName+"?" + "serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8" + "&port="+dbPort+"&autoReconnect=true"; The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to implement Ajax concurrent request control based on JS
>>: Sample code for implementing rolling updates of services using Docker Swarm
This article shares the tutorial of MySql install...
Theoretically, the memory used by MySQL = global ...
1. Basic Use It can be instantiated through the M...
MySQL is a free relational database with a huge u...
When we are doing front-end development, we will ...
1. If the user has the create routine permission,...
This article example shares the specific code of ...
Table of contents 1. Installation 2. Import into ...
I rewrote my personal website recently. I bought ...
Table of contents Introduction Child Process Crea...
The ".zip" format is used to compress f...
echarts word cloud is an extension of echarts htt...
mysql5.6.28 installation and configuration method...
Introduction to jQuery The jQuery library can be ...
Table of contents Basic usage of Promise: 1. Crea...