1. 问题描述:
启动java项目时,报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.的错误。
2. 原因:
mysql的时区设置不正确。
3.解决方法:
在数据库连接的url后面加上 serverTimezone=UTC,即可解决。
serverTimezone连接mysql数据库时指定了时差,UTC是全球标准时间,北京地区早标准时间8小时。
版权声明:本文为hshudoudou原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。