天天看點

解決java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone

錯誤描述:

使用JDBC連接配接資料庫是産生錯誤

解決java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone
應該是資料庫時區問題,在url配置時設定serverTimezone = GMT即可

url = "jdbc:mysql://localhost:3306/student?serverTimezone = GMT";