出现The server time zone value ‘�й���׼ʱ��‘ is unrecognized的解决方法

2022-12-21,,,,

使用mybatis链接数据库时出现如下错误,

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

很可能是没有配置好datasource,再配置文件主句库名称后添加如下设置后重试,

?serverTimezone=Asia/Shanghai

如果还有错误,执行下面命令更改数据库时区,问题解决。

set global time_zone = '+8:00';

set time_zone = '+8:00';

flush privileges;

出现The server time zone value ‘�й���׼ʱ��‘ is unrecognized的解决方法的相关教程结束。

《出现The server time zone value ‘�й���׼ʱ��‘ is unrecognized的解决方法.doc》

下载本文的Word格式文档,以方便收藏与打印。