MySQL time zone value is unrecognized

The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.

You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specific time zone value if you want to utilize time zone support.

如果jdbc驱动为8.0.11版本,则需要在url后面追加serverTimezone参数。

--markup-*<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.11</version>
</dependency>
serverTimezone=UTC
jdbc:mysql://${db.url}/demo?serverTimezone=UTC

或者

改为低版本mysql jdbc驱动程序

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.28</version>
</dependency>

或者

修改mysql server配置文件my.ini

default-time-zone='+08:00'