mysql的时区错误问题: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one

最近用mybatis 插件生成mapper跟domain时,遇到 The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone这个问题, 

 

方案一:

google一下,经过测试,有效的一个办法如下: 

数据库里进行如下操作:

show variables like '%time_zone%';

set global time_zone = '+8:00';

 

方案二:

连接数据库的字符串后添加&serverTimezone=UTC,其中UTC是统一标准世界时间。

jdbc:mysql://127.0.0.1/sell?characterEncoding=UTF-8&userSSL=false&serverTimezone=UTC

 

abc

相关文章:

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