转载自:
原文链接:https://blog.csdn.net/LFF1991/article/details/77196490
(版权声明:本文为原博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。)
错误信息如下:
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。。。
错误原因:
mysql识别时区出现错误,这是因为访问的url中没有指定时区为UTC
原url:
jdbc.url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=utf8
在后面添加时区的参数数即可:
jdbc.url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC