1. 程式人生 > 實用技巧 >SQLException: The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more tha

SQLException: The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more tha

參考自https://blog.csdn.net/weixin_38888926/article/details/89476144

idea報錯:

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 property) to use a more specific time zone value if you want to utilize time zone support.

at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)

在這裡插入圖片描述
解決方法:url後新增 ?serverTimezone=GMT%2B8
在這裡插入圖片描述
在這裡插入圖片描述