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

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.

今天做项目启动的时候出现了这个错误。

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

首先说明一下这是什么原因呢,这是因为引入的最新的mysql 连接驱动包引起的。 

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

解决方案:

 

  • 在配置文件里面修改一下,如下图
  • You must configure either the server or JDBC driver (via the serverTimezone configuration property)