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
Table of contents 1. Introduction 2. JDBC impleme...
background We can use react-color to implement th...
background I originally wanted to download a 6.7 ...
MySQL 8 new features: My personal opinion on MySQ...
Table of contents Use Cases Reactive API related ...
Table of contents 1. Installation and operation o...
1. Dynamic parameters Starting from 2.6.0, you ca...
This article example shares the specific code of ...
Preface Hello everyone, I am Liang Xu. At work, w...
Project Documentation Directory Div+CSS Naming Sta...
Clickhouse Introduction ClickHouse is a column-or...
Copy code The code is as follows: <!DOCTYPE ht...
When it comes to databases, one of the most frequ...
Table of contents 1. Scope 1. Global scope 2. Loc...
The Golden Rule Always follow the same set of cod...