一、unknown system variable"xxx":mysql版本与mysql驱动器版本不一致
1、使版本一致
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.22</version> //版本需匹配
</dependency>
2、注意
spring.datasource.driverClassName=com.mysql.jdbc.Driver
//springboot2.0以后的版本换成com.mysql.cj.jdbc.Driver
二、HikariPool-1-Exception during pool initialization
1.首先检查了数据库账号密码是否正确;
2.再检查数据库的访问权限: IP:%(所有人)的访问权限;
3.时区的问题:
ERROR [main] com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Exception during pool initialization.
java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.
给application.properties文件中的datasource配置节中的url配置末尾加上&serverTimezone=UTC