天天看點

The server time zone value 'AEDT' is unrecognized or represents more than one time zone.記一次本地測試連結澳洲資料庫啟動異常

記一次本地測試連結澳洲資料庫啟動異常

下面是資料連結配置

datasource:

url: jdbc:mysql://xxx:3306/xxxx?useUnicode=true&characterEncoding=utf8&useSSL=false?

username: xxxx

password: xxxx

type: com.zaxxer.hikari.HikariDataSource

啟動抛出異常:

The server time zone value 'AEDT' 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 specifc time zone value if you want to utilize time zone support.

查詢後得知是因為時區差造成的

在連結url後面加上&serverTimezone=UTC,即預設0時區。即可啟動