当前位置:Gxlcms > 数据库问题 > idea关联mysql时报错Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezon'

idea关联mysql时报错Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezon'

时间:2021-07-01 10:21:17 帮助过:49人阅读

解决办法:   来源:https://blog.csdn.net/wsf0001/article/details/103391810

1.进入命令窗口(Win + R),连接数据库 mysql -uroot -p,回车,输入密码,回车,输入:show variables like‘%time_zone‘;如图:

技术图片

2.设置北京时区,set global time_zone=‘+8:00‘;正常情况如下:

 技术图片

 

 

这时你重新连接下数据库,也许能连接成功!

ps:当数据库在执行其他任务时,set global time_zone=‘+8:00‘不起作用,但idea已可以连接mysql,如图:

技术图片

 

 

 



idea关联mysql时报错Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezon'

标签:global   tail   lob   invalid   ble   连接数   net   img   ret   

人气教程排行