[Warning] TIMESTAMP with implicit DEFAULT --explicit_defaults_for_timestamp

发布时间:2020-08-10 19:14:03 作者:urgel_babay
来源:ITPUB博客 阅读:493
2014.9.25
本想在MySQL上面做点实验的,可以登录的时候报错(ps:mysql 服务已经是开启的):
window 7 64位,
MySQL 5.7

[Warning] TIMESTAMP with implicit DEFAULT --explicit_defaults_for_timestamp

日志:

点击(此处)折叠或打开

  1. 2014-09-25T04:19:53.971570Z 0 [Note] Plugin \'FEDERATED\' is disabled.
  2. 2014-09-25T04:19:53.974570Z 0 [Warning] InnoDB: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB\'s internal memory allocator.
  3. 2014-09-25T04:19:53.977570Z 0 [Note] InnoDB: The InnoDB memory heap is disabled
  4. 2014-09-25T04:19:53.978570Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
  5. 2014-09-25T04:19:53.979570Z 0 [Note] InnoDB: Uses system mutexes
  6. 2014-09-25T04:19:53.980570Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
  7. 2014-09-25T04:19:53.982571Z 0 [Warning] InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB
  8. 2014-09-25T04:19:53.987571Z 0 [Note] InnoDB: Number of pools: 1
  9. 2014-09-25T04:19:53.988571Z 0 [Note] InnoDB: Not using CPU crc32 instructions
  10. 2014-09-25T04:19:54.003572Z 0 [Note] InnoDB: Initializing buffer pool, total size = 57.0M, instances = 1
  11. 2014-09-25T04:19:54.012572Z 0 [Note] InnoDB: Completed initialization of buffer pool
  12. 2014-09-25T04:19:54.016573Z 0 [ERROR] InnoDB: .\\ibdata1 must be writable
  13. 2014-09-25T04:19:54.017573Z 0 [ERROR] InnoDB: The system tablespace must be writable
  14. 2014-09-25T04:19:54.218584Z 0 [ERROR] Plugin \'InnoDB\' init function returned error.
  15. 2014-09-25T04:19:54.219584Z 0 [ERROR] Plugin \'InnoDB\' registration as a STORAGE ENGINE failed.
  16. 2014-09-25T04:19:54.220584Z 0 [ERROR] mysqld: unknown option \'-p\'
  17. 2014-09-25T04:19:54.221584Z 0 [ERROR] Aborting

  18. 2014-09-25T04:19:54.222584Z 0 [Note] Binlog end
  19. 2014-09-25T04:19:54.223584Z 0 [Note] Shutting down plugin \'partition\'
  20. 2014-09-25T04:19:54.224584Z 0 [Note] Shutting down plugin \'PERFORMANCE_SCHEMA\'
  21. 2014-09-25T04:19:54.225584Z 0 [Note] Shutting down plugin \'INNODB_SYS_DATAFILES\'
  22. 2014-09-25T04:19:54.227585Z 0 [Note] Shutting down plugin \'INNODB_SYS_TABLESPACES\'
  23. 2014-09-25T04:19:54.228585Z 0 [Note] Shutting down plugin \'INNODB_SYS_FOREIGN_COLS\
但是奇怪的是,这是在cmd下面报错。我用Navicat for Mysql 连接到MySQL,是可以正常连接的。
网上找了很多文章,有以下几种解决方案,可能适合你的情况:
1、删除data目录下的ib_logfile0和ib_logfile1文件,重启MySQL。 
   -----这种多发生在启动MySQL服务时,不能开启MySQL服务。但是我的服务可以正常的开启和关闭:

2、在my.ini mysqld 下添加 explicit_defaults_for_timestamp=true
   -----我添加之后,还是原来的错误。
3、手动的在服务里面,重启MySQL服务
   -----这种可能性表示怀疑。手动的跟命令行下,应该都一样吧

中午吃饭回来继续解决。
可发现,报错不一样了
[Warning] TIMESTAMP with implicit DEFAULT --explicit_defaults_for_timestamp
然后又把添加的参数给注释掉。
再登录的时候,居然可以登录了。

真的百思不得其解。刚刚接触MySQL,很多问题不会,只能通过度娘以及认识的大牛们。

哈哈 现在要下班了,刚刚在Linux环境下同样遇见这个问题:

点击(此处)折叠或打开

  1. [root@BIDEVEDW_DB bin]# ./mysqld -uroot -p
  2. 2014-09-25 17:29:05 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  3. 2014-09-25 17:29:05 24368 [Note] Plugin \'FEDERATED\' is disabled.
  4. 2014-09-25 17:29:05 24368 [Note] InnoDB: Using atomics to ref count buffer pool pages
  5. 2014-09-25 17:29:05 24368 [Note] InnoDB: The InnoDB memory heap is disabled
  6. 2014-09-25 17:29:05 24368 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  7. 2014-09-25 17:29:05 24368 [Note] InnoDB: Compressed tables use zlib 1.2.3
  8. 2014-09-25 17:29:05 24368 [Note] InnoDB: Using Linux native AIO
  9. 2014-09-25 17:29:05 24368 [Note] InnoDB: Using CPU crc32 instructions
  10. 2014-09-25 17:29:05 24368 [Note] InnoDB: Initializing buffer pool, size = 9.0G
  11. 2014-09-25 17:29:07 24368 [Note] InnoDB: Completed initialization of buffer pool
  12. 2014-09-25 17:29:08 24368 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
  13. 2014-09-25 17:29:08 24368 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.

但是这样就可以登录了:

点击(此处)折叠或打开

  1. [root@BIDEVEDW_DB bin]# ./mysql -uroot -p
  2. Enter password:
  3. Welcome to the MySQL monitor. Commands end with ; or \\g.
  4. Your MySQL connection id is 19445
  5. Server version: 5.6.19 Source distribution

  6. Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

  7. Oracle is a registered trademark of Oracle Corporation and/or its
  8. affiliates. Other names may be trademarks of their respective
  9. owners.

  10. Type \'help;\' or \'\\h\' for help. Type \'\\c\' to clear the current input statement.

  11. mysql>
度娘还是那些,这次请教大牛。这是与大牛的对话:
[Warning] TIMESTAMP with implicit DEFAULT --explicit_defaults_for_timestamp
[Warning] TIMESTAMP with implicit DEFAULT --explicit_defaults_for_timestamp

总算明白是怎么会事儿了!
回家!
推荐阅读:
  1. socket_传文件_linux环境
  2. 动态导入模块_断言

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

--explicit default timestamp

上一篇:SACC2018:做好云架构与CDN加速 为业务保驾护航

下一篇:11GR2RAC丢失OCR和CONTROLFILE重建恢复过程

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》