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