妖精的尾巴50集,创新工场投资,廉江齐乐网
java.sql.sqlexception: 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.
原因:time zone 时区错误
解决方法:
一:通过sql命令临时修改,这个只是临时方法,关闭mysql服务后重启又恢复系统默认时区
1.使用root用户登录mysql,输入下面命令。
show variables like '%time_zone%';
2.system为sql默认美国时间,因此将时区设置为当前系统时区即可,采用+8:00格式
set global time_zone='+8:00';
二:给连接数据库url添加servertimezone=utc
语句
jdbc_url=jdbc:mysql://localhost:3306/login?servertimezone=utc
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
浅析我对 String、StringBuilder、StringBuffer 的理解
使用IDEA搭建SSM框架的详细教程(spring + springMVC +MyBatis)
Springboot整合freemarker 404问题解决方案
引入mybatis-plus报 Invalid bound statement错误问题的解决方法
网友评论