The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more than one time zone

环境:

  Jdk

The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more than one time zone

Mysql

The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more than one time zone

mysql驱动程序:

The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more than one time zone

Sringboot:

The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more than one time zone

问题:

Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is 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.

The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more than one time zone

解决方案:

The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more than one time zone

图中红框中url内容修改为:

url: jdbc:mysql://localhost:3306/testMyBatisPlus?useUnicode=true&characterEncoding=utf8&serverTimezone=PRC

 本Bug到此为止,下个见......

上一篇:【朝花夕拾】Android性能优化篇之(四)Apk打包


下一篇:h5做的app和原生app的区别