使用JDBC连接数据库的时候时区错误问题
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.
方法连接
我采用的方法:
1.在数据库数据查询语句:
show variables like '%time_zone%';
2.修改时区
set global time_zone ='+8:00';