MySql 8.0 corresponding driver package matchingAfter the MySql database is updated to version 8.0 or above, the corresponding application database link driver package must also be updated to version 8.0. Otherwise, a driver exception will be reported. A few points to note: 1. The latest driver package Maven download configuration is as follows:<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.11</version> </dependency> 2. The JDBC configuration table is updated as follows:Previous Versions jdbc.driver=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://xxx.xx.xx.xxx:3306/db?characterEncoding=utf-8 jdbc.username=root jdbc.password=admin Current version
Pay attention to the red part, this is where the changes need to be made. After that, you can use the 8.0 version of MySql. MySql 8.0 version driver replacementThe driver of MySQL 8.0 needs to be changed to "com.mysql.cj.jdbc.Driver". The previous "com.mysql.jdbc.Driver" can no longer be used in MySQL 8.0. The official document link is: https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-api-changes.html; In addition, it is recommended to update mysql-connector-java to version 8.0 (https://dev.mysql.com/downloads/connector/j/). In summary, the following two points are modified: 1. Update the mysql-connector-java version:<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.11</version> </dependency> 2. Replace the driver:<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver" connectionURL="jdbc:mysql://127.0.0.1:3306/test? useUnicode=true&characterEncoding=utf-8&useSSL=false" userId="root" password="root"/> The above is my personal experience. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of inline-block layout implementation of CSS display attribute
>>: Introduction to the use of html area image hotspots with a list of related properties
1. Introduction When the amount of data in the da...
Application Scenario Taking the background manage...
Table of contents Understand the core concept of ...
There are many types of auto-increment IDs used i...
xml <?xml version="1.0" encoding=&qu...
The conversion between time, string and timestamp...
Preface This is a new function I came across rece...
"We're writing our next set of mobile pr...
Under Linux, if you download and install an appli...
Author | Editor Awen | Produced by Tu Min | CSDN ...
What is a transaction? A transaction is a logical...
What is ORM? ORM stands for Object Relational Map...
Installation Environment 1. gcc installation To i...
Table of contents 1. Effect Demonstration 2. Impl...
1. Case Take all employees who are not the head o...