在一個項目中。鏈接數據庫,個人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