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

今天药忘吃喽~ 2021-10-19 06:38 232阅读 0赞

错误信息:

Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: 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

解决办法:

在url上加上serverTimezone=UTC

在这里插入图片描述

  1. server:
  2. port: 8000
  3. spring:
  4. datasource:
  5. driverClassName: com.mysql.cj.jdbc.Driver
  6. url: jdbc:mysql://localhost:3306/ml?characterEncoding=UTF8&serverTimezone=UTC
  7. username: root
  8. password: 123456
  9. profiles:
  10. active: dev

发表评论

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

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

相关阅读