报错
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.
时区错误,将时区设置为你当前系统时区即可
Win+R cmd 打开命令行
登陆mysql
mysql -u root -p
执行命令:
show variables like '%time_zone%';
结果:
+------------------+--------+
| Variable_name | Value |
+------------------+--------+
| system_time_zone | |
| time_zone | SYSTEM |
+------------------+--------+
2 rows in set, 1 warning (0.03 sec)
执行修改命令:
set global time_zone='+8:00';//修改为北京时间
或者直接将 url改为:
"jdbc:mysql://localhost:3306/shiro_test?serverTimezone=GMT%2B8"