mysql的时区错误问题: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one

时间:2023-03-09 01:04:09
mysql的时区错误问题: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one

问题:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone....

解决方案:

show variables like '%time_zone%';
set global time_zone='+8:00';

原文地址:https://blog.csdn.net/lovequanquqn/article/details/84105311

补充:根据上面的设置,可能会出现MySQL服务重启之后,时区变回之前的设置,此时可以尝试修改MySQL的配置文件my.ini的时区配置。

#设置默认时区
default-time-zone='+08:00'

修改之后重启服务。