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

  • 相关阅读:
    常用模块
    python里面的奇技淫巧
    day_06、面向对象(二)
    day_06、面向对象
    day_06、递归、二分查找
    day_05、内置函数、匿名函数
    day_05、迭代器、生成器
    day_04、函数
    php调用webservice接口
    php在命令行输出进度条
  • 原文地址:https://www.cnblogs.com/sea-stream/p/11238292.html
Copyright © 2011-2022 走看看