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

错误描述:

使用JDBC连接数据库是产生错误

应该是数据库时区问题,在url配置时设置serverTimezone = GMT即可

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

猜你喜欢

转载自www.cnblogs.com/silentteller/p/12309492.html