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

在一个项目中。链接数据库,个人mysql 是 5.7 版本的。java

竟然报错了 MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT'mysql

说是 jdbc 的链接 驱动版本过低了即 mysql-connector-java sql

奇怪了,我以前一些项目,使用的驱动版本更低都没有事,多是 数据库使用的 datasouce 版本的问题吧。数据库

不理它, 换个搞版本的.net

但是又报错了: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. code

百度一下,换成这个仍是报错:server

jdbc:mysql://localhost:3306/yinyousentence?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&aserverTimezone=UTC
 blog

换成 ?serverTimezone=UTC io

便可百度

参考  https://blog.csdn.net/qq_36324685/article/details/72552947

相关文章
相关标签/搜索