启动idea项目时报错The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one time zone…
原因:因为MySQL数据库的时区值默认是美国的,和我们的早8:00,需要更改时区间。
1.登录MySQL,查看时区间
mysql -u用户名 -p密码
2.输入命令查看
show variables like'%time_zone'; //查看时区间
3.解决方法:找到mysql的配置文件
4.在配置文件下找到[mysqlId]的节点下添加
default-time-zone='+08:00'
5.然后在使用管理员运行cmd,进行重启
net stop mysql //停止mysql服务
net start mysql //启动mysql服务
6.再次登录查看 是否成功
mysql -u用户名 -p密码 //登录mysql
show variables like'%time_zone'; //查看时区间
问题解决,启动项目就没这个错误了。