我们在使用IDEA 的视图工具链接MySQL8的时候,即便你加载了驱动程序 也会报错
Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually.
我们需要在MySQL中使用如下命令 set global time_zone=’+8:00’;
时区错误,MySQL默认的时区是UTC时区,比北京时间晚8个小时。
所以要修改mysql的时长
在mysql的命令模式下,输入:
set global time_zone=’+8:00’;
再次连接成功
select now(); 查看mysql系统时间。和当前时间做对比
set global time_zone = ‘+8:00’;设置时区更改为东八区
flush privileges; 刷新权限