症状
IDEA连接mysql报错!Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ prope
原因
MySQL驱动jar中的默认时区是UTC。
UTC代表的是全球标准时间 ,但是我们使用的时间是北京时区也就是东八区,
领先UTC八个小时。
因为时区不一致,所以提示Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
服务器返回了无效的时区,去“高级”标签中手工设置“serverTimezon"属性值。
解决方案
name:serverTimezone,value:Asia/Shanghai