nested exception is java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized异常

在连接数据库时出现以下异常 : 

nested exception is java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized

出现原因 : 数据库时区问题

解决办法 : 1. 在终端开启mysql, 输入以下命令 :

        show variables like '%time_zone%';

     2. 继续输入以下命令 : 

        set global time_zone='+8:00';

posted @ 2019-09-19 12:37  gogoog  阅读(370)  评论(0编辑  收藏  举报