Mysql-connector-java driver version problemSince my database version is 5.7.28, version problems often occur when using java to connect to mysql.
Establishing an SSL connection without server authentication is not recommended. SSL – Secure Sockets Layer Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Even if the driver name is changed to com.mysql.cj.jdbc.Driver in mysql5.7.28, an error will still be reported. The reason is that the version in the pom project object model file is not changed to mysql-connector-java8.0 or later mysql-connector-java and MySQL corresponding versionsSince my version is mysql5.7.28 using connector-java version 5.1, the above error still occurs. Therefore, use connector-java 8.0 or above in mysql5.6 or above. And you need to set the time zone when using it
The serverTimezone here must be written as serverTimezone=Asia/Shanghai. Writing it as serverTimezone=Shanghai will also result in an error. It seems that the time zone of Shanghai cannot be found. There may be more than one Shanghai in the world, haha! mysql-connector-java and Java corresponding versionIn view of the above, for beginners, it is better to use mysql-connector-java 8.0 or above The above is the details of the Mysql-connector-java driver version problem. For more information about the Mysql connector java driver, please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: Three.js realizes Facebook Metaverse 3D dynamic logo effect
>>: Unicode signature BOM (Byte Order Mark) issue for UTF-8 files
Preface The keywords of MySQL and Oracle are not ...
Prepare a CentOS6 installation disk (any version)...
I searched the entire web and found all kinds of ...
Pitfalls encountered I spent the whole afternoon ...
Recently I've been working on a framework tha...
MySQL master-slave replication allows data from o...
Table of contents Import on demand: Global Import...
MySQL is an open source, small relational databas...
Preface In this article, we will continue to expl...
Development environment windows Development Tools...
Table of contents 1. DOM & BOM related 1. Che...
Download link: Operating Environment CentOS 7.6 i...
Preface: When using MySQL, you may encounter time...
Table of contents Preface 1. Binary Tree 1.1. Tra...
Table of contents 1. Scenario description: 2. Cas...