- 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连接中的几个问题
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: 高版本问题
version >5.7.0
已经开始区分大小写了
- 4 :连接问题
maven 坐标
<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: 驱动问题
### MySQL Connector/J 5.x (旧版驱动)
#jdbc.driver_class=com.mysql.jdbc.Driver
### MySQL Connector/J 6.x (新版驱动)
jdbc.driver_class=com.mysql.cj.jdbc.Driver