Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually.

idea关联mysql数据库时,连接报错:

Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually.

具体原因:

msql的连接驱动8.0以上修改,在url上需要加上时区
Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually.点击Connection type 修改defalut为URL only
Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually.
在url加上jdbc:mysql://localhost/jpa?useSSL=true&serverTimezone=Asia/Shanghai
最后即可连接成功
Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually.