JDBC系统时间错误: The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more than one time

it2025-12-02  4

错误:

Exception in thread “main” 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 specifc time zone value if you want to utilize time zone support.

在库名后面加?serverTimezone=GMT%2B8

jdbc:mysql://localhost:port/test?serverTimezone=GMT%2B8
最新回复(0)