2017-07-28T12:46:35.138596Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
创新互联专注于企业全网营销推广、网站重做改版、阳江网站定制设计、自适应品牌网站建设、H5网站设计、电子商务商城网站建设、集团公司官网建设、成都外贸网站建设、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为阳江等各大城市提供网站开发制作服务。
其实这个报错在安装的初始化的时候就已经有了(在第一篇安装的文章中能看到),只不过没有影响安装和启动,所以并没有管,以为只是安装的时候检查类的报错,后来在重启MySQL发现在error日志里面也会出现这个报错
解决方法:
在mysql官方网站上找到这么一段话
Those nonstandard behaviors remain the default for TIMESTAMP but as of MySQL 5.6.6 are deprecated and this warning appears at startup:
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated.
Please use --explicit_defaults_for_timestamp server option (see
documentation for more details).
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:
这段话的意思是在5.6以后有这么一项检查,所以要开启标准的 explicit_defaults_for_timestamp功能,但是默认是关闭的。
在my.cnf中加入
[mysqld]
explicit_defaults_for_timestamp=true
如果还是报错,按mysql提示的执行下面的mysql启动命令:
./bin/mysqld_safe --user=mysql --explicit_defaults_for_timestamp=1 &
当前名称:[Warning]TIMESTAMPwithimplicitDEFAULTvalueisdeprecated.
分享URL:https://www.cdcxhl.com/article2/gsgjic.html
成都网站建设公司_创新互联,为您提供定制网站、App设计、网站设计公司、企业网站制作、网页设计公司、网站排名
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联