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

时间:2022-01-25 17:28:04

今天用mysql连接数据库时,出现The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.问题.在伟大的度娘查后,是时区问题.

mysql默认的是美国时区,而中国比美国晚8个小时,所以要+8:00

具体步骤:

1) 以管理员身份进入mysql

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

2) show variables like '%time_zone%';

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

3) set global time_zone='+8:00';

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

4) 这为啥时间没有改变呢,不要慌,退出mysql,在进入

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

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

5) 好了,这个bug解决了,开始下一个

相关文章