搭建 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.
图中可以看见,我使用的mysql驱动版本是 8.0.19
跟改为 5.1.48 版本运行是正常的
所以大家可以尝试降低版本,或者SQL连接后面添加
serverTimezone
如图片所示
亲测可用