原文:mysql錯誤:java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone.

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 proper ...

2020-02-26 11:57 0 1415 推薦指數:

查看詳情

解決JDBC連接MySQL 8時得異常:java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone.

使用原來基於MySQL 5.1的JDBC代碼運行時,報錯: 這是由於數據庫和JDBC所在的系統時差引起,在jdbc連接的url后面加上參數serverTimezone=GMT可解決問題,如果使用gmt+8時區,需要對gmt+8轉碼,寫成GMT%2B8。 最后將url改成類似於下面 ...

Fri Aug 09 03:31:00 CST 2019 0 388
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM