mysql的時區錯誤問題: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one
最近用mybatis 插件生成mapper跟domain時,遇到 The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone
這個問題,
方案一:
google一下,經過測試,有效的一個辦法如下:
數據庫里進行如下操作:
show variables like '%time_zone%';
set global time_zone = '+8:00';
方案二:
連接數據庫的字符串后添加&serverTimezone=UTC,其中UTC是統一標准世界時間。
jdbc:mysql://127.0.0.1/sell?characterEncoding=UTF-8&userSSL=false&serverTimezone=UTC
abc