As indicated by the warning, to turn off the nonstandard behaviors, enable the new explicit_defaults_for_timestamp system variable at server startup. With this variable enabled, the server handles TIMESTAMP as follows instead:
所显示的警告,关闭非标准的行为,使新的explicit_defaults_for_timestamp系统变量在服务器启动时启用了这个变量,服务器处理时间戳,如下所示:

TIMESTAMP columns not explicitly declared as NOT NULL permit NULL values. Setting such a column to NULL sets it to NULL, not the current timestamp.
时间戳列没有明确声明为not NULL允许NULL值。设置这样的列为NULL将它设置为NULL,并不是当前的时间戳。

No TIMESTAMP column is assigned the DEFAULT CURRENT_TIMESTAMP or ON UPDATE CURRENT_TIMESTAMP attributes automatically. Those attributes must be explicitly specified.
不会自动指定默认TIMESTAMP列 为CURRENT_TIMESTAMP或更新CURRENT_TIMESTAMP属性。这些属性必须显式地指定。

TIMESTAMP columns declared as NOT NULL and without an explicit DEFAULT clause are treated as having no default value. For inserted rows that specify no explicit value for such a column, the result depends on the SQL mode. If strict SQL mode is enabled, an error occurs. If strict SQL mode is not enabled, the column is assigned the implicit default of '0000-00-00 00:00:00' and a warning occurs. This is similar to how MySQL treats other temporal types such as DATETIME.
TIMESTAMP列声明为NOT NULL,没有一个明确的 DEFAULT 值被视为没有默认值。为插入的行指定没有显式值的列,结果取决于SQL模式。如果启用了SQL模式严格,出现一个错误。如果严格SQL模式未启用,列分配隐含默认值“0000-00-00,”和一个警告的发生。这类似于MySQL如何对待其他时态类型如DATETIME。


修改 my.ini 
[mysqld ]
添加 explicit_defaults_for_timestamp=true

[Warning] TIMESTAMP with implicit DEFAULT value is deprecated的更多相关文章

  1. Mysql报错[Warning] TIMESTAMP with implicit DEFAULT value is deprecated和Buffered warning: Changed limits

    报错2019-04-24 12:06:46 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use -- ...

  2. [Warning] TIMESTAMP with implicit DEFAULT value is deprecated

    启动mysql时,报如下警告信息: [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explic ...

  3. [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

    Linux下安装MySQL执行scripts/mysql_install_db --user=mysql脚本时,报错如下: Filling help tables...2019-12-24 16:46 ...

  4. MySQL 5.6.4 中TIMESTAMP with implicit DEFAULT value is deprecated 错误

    [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.   在免安装版mysql安装过程中出现:[Warning] TIMESTA ...

  5. MYSQL TIMESTAMP with implicit DEFAULT value is deprecated.

    TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp se ...

  6. MySQL错误:TIMESTAMP with implicit DEFAULT value is deprecated

    用于存放数据库的文件夹不为空,清空了再来一次!

  7. TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option

    先解决他 详细不详解 在初始化 加上 --explicit_defaults_for_timestamp=true 即可

  8. TIMESTAMP with implicit DEFAULT value is deprecated

    出错版本 mysql 5.7 why? (警告)不包含隐式默认值的时间戳 way? 在 /etc/my.conf中 mysqld 模块中添加 explicit_defaults_for_timesta ...

  9. linux-2.6.22.6/Makefile:416: *** mixed implicit and normal rules: deprecated syntax

    今天在按照韦东山大哥的教程流程编译内核的时候出现了这个问题      linux-2.6.22.6/Makefile:416: *** mixed implicit and normal rules: ...

随机推荐

  1. DevOps:怎么实现源代码注释和系统文档的自动化更新?

    [编者按]计算机软件传统定义为:软件是计算机系统中与硬件相依存的另一部分,软件包括程序.数据及其相关文档的完整集合.然而在时下的开发中,文档的合规性往往被忽视的干干净净.本文由 Todd Waits ...

  2. Java 中最常见的 5 个错误

    在编程时,开发者经常会遭遇各式各样莫名错误.近日,Sushil Das 在 Geek On Java上列举了 Java 开发中常见的 5 个错误,与君共「免」. 原文链接:Top 5 Common M ...

  3. GridControl Find/Clear 添加图标

    public static void ControlFind(GridControl grid) { FindControl fControl = null; foreach (Control ite ...

  4. java基础知识回顾之javaIO类---BufferedReader和BufferedWriter

    使用了装饰设计模式:此类的设计是为了提高流操作数据的效率.思想就是定义容器将数据进行临时存储,对于缓冲区对象,其实就是将这个容器进行了分装,并提供了更高效的操作方法. BufferReader: pa ...

  5. SVN使用之分支、合并

    首先说下为什么我们需要用到分支-合 并.比如项目demo下有两个小组,svn下有一个trunk版.由于客户需求突然变化,导致项目需要做较大改动,此时项目组决定由小组1继续完成原来正 进行到一半的工作[ ...

  6. MVC新手指南

    MVC新手指南 2010-04-06 09:54:23 18839 次阅读 0 条评论   本文感谢东西提供 模型-视图-控制器(MVC)可能是近年来网络编程圈子里最常被提及的模式之一.目前与网络应用 ...

  7. SpringMVC + MyBatis 环境搭建(转)

    本文转自:http://blog.csdn.net/zoutongyuan/article/details/41379851 源码地址:https://github.com/starzou/quick ...

  8. skip-name-resolv

    skip-name-resolve skip-name-resolve 简单解释 MySQL server received a request from you to allow you to co ...

  9. ActionResult

    ActionResult public abstract class ActionResult { public abstract void ExecuteResult(ControllerConte ...

  10. ES6入门之Generator函数

    Generator Generator函数是ES6提供的一种异步编程解决方案,Generator函数是一个状态机,封装了多个内部状态. 执行Generator函数会返回一个遍历器对象,也就是说,Gen ...