1、执行sql
select version() from dual;
2、-- 查看 mysql版本号 = 8.0.19
3、替换 pom.xml mysql 驱动
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
</dependency>
4、更改配置文件 驱动类
driver-class-name: com.mysql.jdbc.Driver
改成
driver-class-name: com.mysql.cj.jdbc.Driver
5.如果遇到 The server time zone value 'Öйú±ê׼ʱ¼ä'
将URL 改成 url=jdbc:mysql://127.0.0.1:3306/yitianb2b?useUnicode=true&characterEncoding=utf8&autoReconnect=true&serverTimezone=GMT%2B8&useSSL=false