zoukankan      html  css  js  c++  java
  • ERROR 1067 (42000): Invalid default value for 'time'

    修改sql_mode,去掉NO_ZERO_IN_DATE,NO_ZERO_DATE这两个参数

    查看

    root@22:43:27 [hmda]> show variables like 'sql_mode';
    +---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Variable_name | Value                                                                                                                                                           |
    +---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | sql_mode      | ONLY_FULL_GROUP_BY,NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
    +---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
    1 row in set (0.00 sec)
    --------------------- 

    修改

    mysql> set session                                                                  
    -> sql_mode='ONLY_FULL_GROUP_BY,NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql>

    参考:

    https://blog.csdn.net/xionglang7/article/details/44499307

  • 相关阅读:
    程序员学习提高必看的一篇文章
    SpringAOP拦截器的代理机制
    springboot03_RabbitMQ
    Docker_02
    Docker_01
    Redis_02
    Redis_01
    关于Linux下内存和Swap
    密码学DAY2
    密码学DAY1_02
  • 原文地址:https://www.cnblogs.com/sea-stream/p/11238292.html
Copyright © 2011-2022 走看看