首页 > 代码库 > Eclipse连接MySQL出现Server time zone is unrecognized错误

Eclipse连接MySQL出现Server time zone is unrecognized错误

错误代码:

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后加上 serverTimezone=GMT 即可。如:

jdbc:mysql://localhost:3306/test?characterEncoding=utf8&useSSL=true&serverTimezone=GMT

参考文章:

http://blog.csdn.net/oppo5630/article/details/52162783

http://blog.csdn.net/chyo098/article/details/51811886

https://dev.mysql.com/downloads/connector/j/

 

Eclipse连接MySQL出现Server time zone is unrecognized错误