在Intellij IDEA中通过Database连接Mysql报错:Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually.
原因是MySQL驱动中默认时区是UTC,与本地时间(中国)相差八个小时,所以链接不上,
解决方法:
点开最右侧 Advanced,找到 serverTimezone,在右侧value处填写 Asia/Shanghai,保存即可!

网友评论