IDEA连接mysql报错。Server returns invalid timezone. Go to ‘Advanced‘ tab and set ‘serverTimezone‘ prope

IDEA连接mysql报错。Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ prope

119/5000
服务器返回无效的时区。 进入“高级”选项卡,手动设置“服务器时区”属性

先检查环境变量
IDEA连接mysql报错。Server returns invalid timezone. Go to ‘Advanced‘ tab and set ‘serverTimezone‘ prope

连接成功了
IDEA连接mysql报错。Server returns invalid timezone. Go to ‘Advanced‘ tab and set ‘serverTimezone‘ prope
继续输入 show variables like’%time_zone’; (注意不要漏掉后面的分号),回车,如图:
IDEA连接mysql报错。Server returns invalid timezone. Go to ‘Advanced‘ tab and set ‘serverTimezone‘ prope
显示 SYSTEM 就是没有设置时区啦。

输入set global time_zone = ‘+8:00’; 注意不要漏掉后面的分号)

IDEA连接mysql报错。Server returns invalid timezone. Go to ‘Advanced‘ tab and set ‘serverTimezone‘ prope

但是为什么我再输入一遍有错误呢?
IDEA连接mysql报错。Server returns invalid timezone. Go to ‘Advanced‘ tab and set ‘serverTimezone‘ prope

没管他

测试一下
连接成功
IDEA连接mysql报错。Server returns invalid timezone. Go to ‘Advanced‘ tab and set ‘serverTimezone‘ prope