mysql 连接异常:The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time

1.错误描述:

mysql 连接异常: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.错误分析(谷歌翻译):

服务器时区值'©���׼ʱ��'无法识别或代表多个时区,若是想要利用时区支持,则必须配置服务器或JDBC驱动程序(通过serverTimezone配置属性)以使用更特定的时区值。

 

3.解决方案:如下,拼接 serverTimezone=GMT%2B8( 东八区)即可。

jdbc:mysql://localhost:3306/fydb?serverTimezone=GMT%2B8

你可能感兴趣的:(mysql)