不建议使用具有默认值DEFAULT的警告TIMESTAMP [英] Warning TIMESTAMP with implicit DEFAULT value is deprecated

查看:475
本文介绍了不建议使用具有默认值DEFAULT的警告TIMESTAMP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

再次需要您的帮助:).我是mysql的新手,今天当我决定做一些工作并启动MySQL服务器时,收到以下警告

Once again I need your help:) . I am new to mysql and today when I decided to do some work and start the MySQL server, I get the following warning

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

我知道我应该在某个地方进行更改,但是我不知道在哪里...我正在尝试通过执行bin目录中的mysqld文件来启动MySQL服务器.如果有人设法向我解释为什么MySQL服务器不想启动以及我该怎么办...,我将不胜感激.

I know I should change something somewhere but I don't know where... I'm trying to start MySQL server with executing mysqld file in bin directory. I would be very grateful if someone manage to explain me why MySQL server does not want to start and what can I do... Thank you in advance.

推荐答案

您需要设置

  • 在命令行上添加--explicit_defaults_for_timestamp=#.
  • 在选项文件my.ini/my.cnf/等中进行设置-选项文件格式.
  • 将其设置为系统变量.
    1. Append --explicit_defaults_for_timestamp=# onto your command line.
    2. Setting it in your option file my.ini / my.cnf / etc - Option-File Format.
    3. setting it as a system variable.

    这篇关于不建议使用具有默认值DEFAULT的警告TIMESTAMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆