原因:

MySQL驱动jar中的默认时区是UTC。

UTC代表的是全球标准时间 ,但是我们使用的时间是北京时区也就是东八区,领先UTC八个小时。

因为时区不一致,所以提示Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
服务器返回了无效的时区,去“高级”标签中手工设置“serverTimezon"属性值。
Asia/Shanghai
解决IDEA连接mysql报错:Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' prope
设置时区不出意外是会解决问题的,但是我去看了一下官方文档说是要设置idea连接MySQL的驱动,下面说说怎么修改驱动

另一种解决办法 — 同步mysql驱动

我本机安装的mysql版本是5.7的,那么IDEA要连接mysql也应该匹配下驱动版本。把Driver改成MySQL for 5.1就可以了
解决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
嘻嘻 我的情况已经完美解决 帮助到你了给我点个赞呀,有问题其他问题也可以讨论

相关文章:

  • 2022-12-23
  • 2021-08-04
  • 2021-07-11
  • 2021-05-05
  • 2021-09-17
  • 2021-03-31
  • 2022-12-23
  • 2021-10-11
猜你喜欢
  • 2021-08-10
  • 2021-12-27
  • 2021-06-17
  • 2021-05-08
相关资源
相似解决方案