“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 specific time zone value if you want to utilize time zone support.”

 

方法1
修改数据库时区。在cmd命令中进入MySQL输入如下命令即可。
set global time_zone = '+8:00';  ##修改mysql全局时区为北京时间,即我们所在的东8区
set time_zone = '+8:00';  ##修改当前会话时区
flush privileges;

缺点:此方法可以临时解决问题,但是一旦关机或重启mysql服务后下一次又需要重新去设置。


方法2
在MySQL的配置文件my.ini中加入
default-time_zone = '+8:00'

 

相关文章:

  • 2021-09-10
  • 2021-12-16
  • 2022-12-23
  • 2021-10-11
  • 2021-10-05
  • 2022-12-23
猜你喜欢
  • 2021-12-19
  • 2021-11-01
  • 2021-07-06
  • 2022-12-23
  • 2021-08-12
相关资源
相似解决方案