报错原因意思是说:mysql5.7版本中有了一个STRICT mode(严格模式),而在此模式下默认是不允许设置日期时间的值为全0值的,所以想要  解决这个问题,就需要修改sql_mode的值。

修改全局设置

mysql> set @@global.sql_mode=(select replace(@@global.sql_mode,'NO_ZERO_IN_DATE,NO_ZERO_DATE',''));

mysql> select @@global.sql_mode;

  

相关文章:

  • 2021-11-24
  • 2021-04-09
  • 2021-05-25
  • 2021-06-11
  • 2021-06-09
  • 2021-11-12
猜你喜欢
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-08
  • 2021-05-17
  • 2021-06-21
相关资源
相似解决方案