解决java.sql.SQLException: The server time zone value '乱码'

解决ava.sql.SQLException: The server time zone value '乱码'

原因

1.mysql数据库与驱动的版本不匹配
我的mysql是8.0.16版本的
1734701-20200117225325111-153454610.png
所以导入的驱动包版本要正确

 
        
            mysql
            mysql-connector-java
            8.0.16
        

2.时区的问题
加上&&serverTimezone=GMT

spring.datasource.url=jdbc:mysql://127.0.0.1:3306/springboot?characterEncoding=UTF-8&&serverTimezone=GMT
spring.datasource.username=root
spring.datasource.password=*****

你可能感兴趣的:(解决java.sql.SQLException: The server time zone value '乱码')