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
Table of contents 1. Project Prospects 2. Knowled...
The so-called cascading replication is that the m...
Table of contents 1. Deconstruction Tips 2. Digit...
Preface Slow query log is a very important functi...
This article shares the specific code of React to...
Enter the running container # Enter the container...
This article shares the specific code for WeChat ...
1. Download Download address: https://dev.mysql.c...
Table of contents 1. Schematic diagram of group q...
Unicode Signature BOM - What is the BOM? BOM is th...
This article uses an example to illustrate the us...
I believe everyone has used JD. There is a very c...
Copy the following code to the code area of Drea...
Some people use these three tags in a perverted wa...
Preface When docker run creates and runs a contai...