异常信息:
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 time zone support.
原因:
Mysql的JDBC从6.0以后得版本必须设置一下ServerTimeZone参数。
解决方案:
第一种:在mysql的安装包下的my.ini文件里加入下面配置:
default-time-zone=’+08:00’;
第二种:设置mysql的时区:
set global time_zone='+8:00';