- 1:
Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
- 2:
This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The
Mysql6.0連接中的幾個(gè)問(wèn)題
user=root
password=
#old driver
#driverClass=com.mysql.jdbc.Driver
#new driver is as follow:
driverClass=com.mysql.cj.jdbc.Driver
jdbcUrl=jdbc:mysql://localhost:3306/spring?serverTimezone=UTC
- 3: 高版本問(wèn)題
version >5.7.0
已經(jīng)開(kāi)始區(qū)分大小寫(xiě)了
- 4 :連接問(wèn)題
maven 坐標(biāo)
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.4</version>
</dependency>
### MySQL Connector/J 5.x (舊版連接)
#jdbc.url=jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf8
### MySQL Connector/J 6.x (新版連接)
jdbc.url=jdbc:mysql:///test?serverTimezone=UTC&characterEncoding=utf8&useUnicode=true&useSSL=false
- 5: 驅(qū)動(dòng)問(wèn)題
### MySQL Connector/J 5.x (舊版驅(qū)動(dòng))
#jdbc.driver_class=com.mysql.jdbc.Driver
### MySQL Connector/J 6.x (新版驅(qū)動(dòng))
jdbc.driver_class=com.mysql.cj.jdbc.Driver