項目啓動報錯The server time zone value '�й���׼ʱ��' is unrecognize

    今天在使用一個第三方的任務調度平臺時,報錯The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must...

    原因是使用了Mysql Connector/J 6.x以上的版本,然後就報了時區的錯誤,解決方法:

    在配置url的時候不能簡單寫成 :
    jdbc:mysql://localhost:3306/yzu
    而是要寫成 :
    jdbc:mysql://localhost:3306/yzu?serverTimezone=UTC

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章