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 specifc time zone value if you want to utilize 問題
錯誤原因:
????本人用最新版本的mysql數據庫
????使用原mysql5.1.38不會出現該問題,但會提示版本驅動過舊的情況
????使用了Mysql最新版驅動所以報錯
????新版驅動名字為 driverClass=“com.mysql.cj.jdbc.Driver”
????解決方案:
????方案1、在項目代碼-數據庫連接URL后,加上 ?serverTimezone=UTC(注意大小寫必須一致)
方案2、在mysql中設置時區,默認為SYSTEM(推薦)
set global time_zone=’+8:00’
mysql> set global time_zone='+8:00';
Query OK, 0 rows affected (0.01 sec)