jdbc 连接数据库出现serverTimezone问题

转自 https://my.oschina.net/gef/blog/712383

在String url=“jdbc:mysql://localhost:3306/big3”; //?serverTimezone=UTC出现报错

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.

把URL改为String url=“jdbc:mysql://localhost:3306/big3?serverTimezone=UTC”;
即可

你可能感兴趣的:(jdbc 连接数据库出现serverTimezone问题)