SpringBoot连接MySQL8.0报错:-The Server time zone value ‘�й���ʱ��’ is unrecognized or represents more
程序员文章站
2022-11-30 16:47:34
报错信息: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...
报错信息:
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.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.16.jar:8.0.16]
解决方法:
在配置文件application.properties中,spring.datasource.url改为
spring.datasource.url=jdbc:mysql://localhost:3306/你的数据库名称?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=true
即增加:serverTimezone=UTC
本文地址:https://blog.csdn.net/qq_41138935/article/details/107311139
上一篇: 女人内裤上隐藏着这些疾病 千万要警惕!
下一篇: 荐 所有关联表查询方式