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

搭建 Spring Boot 提示 Could not open JDBC Connection for transaction; 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._第1张图片

图中可以看见,我使用的mysql驱动版本是 8.0.19
The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone._第2张图片跟改为 5.1.48 版本运行是正常的
The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone._第3张图片
The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone._第4张图片所以大家可以尝试降低版本,或者SQL连接后面添加

serverTimezone

如图片所示
The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone._第5张图片
亲测可用

你可能感兴趣的:(java)