DataGrip 2020.1连接数据库报错 Server returns invalid timezone. Need to set‘serverTimezone’property

DataGrip 2020.1连接数据库报错 Server returns invalid timezone. Need to set‘serverTimezone’property

 原因是MySQL驱动中默认时区是UTC,与本地时间(中国)相差八个小时,所以链接不上。

点击Set time zone

 

1.在框中填写 GMT,保存即可!(或填写 Asia/Shanghai)

 

2.也可以在url后添加:?serverTimezone=GMT

 

PS:
GMT(Greenwich Mean Time):格林威治标准时间
UTC:世界标准时间
CST(China Standard Time):中国标准时间

GMT + 8 = UTC + 8 = CST

猜你喜欢

转载自blog.csdn.net/m0_58719994/article/details/121906496