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. POJ1811 Prime Test(miller素数判断&&pollar_rho大数分解)

    http://blog.csdn.net/shiyuankongbu/article/details/9202373 发现自己原来的那份模板是有问题的,而且竟然找不出是哪里的问题,所以就用了上面的链接 ...

  2. js-jQuery对象与dom对象相互转换

    http://blog.csdn.net/jueshengtianya/article/details/8823091   核心提示:jquery选择器得到的jquery对象和标准的 javascri ...

  3. iOS数组和字符串的转化

    NSMutableArray *components = [messageStr componentsSeparatedByString:@"*"] ; 反过来为 NSStrig ...

  4. (3)VS2010+Opencv-2.4.8的配置攻略

    这是windows平台上的东西,我为什么要写到安卓这一块呢 因为作者做的安卓方面的东西需要先在windows平台实现一下,所以就想写这篇东西,也参考了网上很多教程,不得不感叹,这些软件版本更新的太快. ...

  5. Codeforces Round #337 (Div. 2) C. Harmony Analysis 数学

    C. Harmony Analysis   The semester is already ending, so Danil made an effort and decided to visit a ...

  6. 如何理解 MySQL 中的 <=> 操作符?

    问题 : 我在看以前的一个开发者的代码时看到 WHERE p.name <=> NULL 在这个查询语句中 <=>符号是什么意思啊?是不是和 =号是一样啊?还是一个语法错误啊? ...

  7. Assembly(c#中简单说明[转]

    什么是Assembly(程序集)?Assembly是一个包含来程序的名称,版本号,自我描述,文件关联关系和文件位置等信息的一个集合.在.net框架中通过Assembly类来支持,该类位于System. ...

  8. 自己的gitignore文件

    *.bak*.txt*.vm.gitignore#svn.svn/# built application files*.apk*.ap_ # files for the dex VM*.dex # J ...

  9. UNIX网络编程——网络IPC:套接字

    UNIX网络编程——网络IPC:套接字 Contents 套接字接口 套接字描述符 寻址 字节序 地址格式 地址查询 绑定地址 建立连接 数据传输 套接字选项 带外数据 UNIX域套接字 使用套接字的 ...

  10. Spring框架学习之第7节

    配置Bean的细节 ☞尽量使用scope=”singleton”,不要使用prototype,因为这样对我们的性能影响较大 ②如何给集合类型注入值 Java中主要的map,set,list / 数组 ...