mysql连接数据库报错:java.sql.SQLException: The server time zone value

错误信息:

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.

错误原因:由于数据库和系统时区差异所造成的
错误解决:在jdbc连接url后面加上&serverTimezone=UTC

spring.datasource.url = jdbc:mysql://127.0.0.1:3306/xxx?characterEncoding=utf-8&serverTimezone=UTC

问题解决

猜你喜欢

转载自blog.csdn.net/noob9527/article/details/90669770
今日推荐