You must configure either the server or JDBC driver (via the serverTimezone configuration property)

出现如下错误:

  1. 2019-12-21 14:51:41,585 [main] [com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:798)] - [ERROR] init datasource error, url: jdbc:mysql://localhost:3306/test
  2. java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

在这里插入图片描述
主要是使用的mysql依赖版本过高

在下图的位置上添加?serverTimezone=Asia/Shanghai在这里插入图片描述
修改后的内容是
在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,94人围观)

还没有评论,来说两句吧...

相关阅读