zoukankan      html  css  js  c++  java
  • mysql删除数据库文件ibdata1后引发的故障

    进行性能测试是发现大量报错:

    Duplicate entry主键重复


    可以看到mysql数据库中已经没有innodb引擎启动信息了

    之前发现ibdata1占用了大量硬盘,为了省出空间删除了数据库ibdata1文件
    此时,删除ibdata1和ib_logfile0,ib_logfile1...再次重启即可恢复正常
    需要注意的是,其中innodb引擎的表被破坏掉了,需要重新导入


    mysql> show engines;
    
    
    +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
    | Engine             | Support | Comment                                                        | Transactions | XA   | Savepoints |
    +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
    | MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
    | PERFORMANCE_SCHEMA | YES     | Performance Schema                                             | NO           | NO   | NO         |
    | MyISAM             | DEFAULT | MyISAM storage engine                                          | NO           | NO   | NO         |
    | BLACKHOLE          | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
    | MRG_MYISAM         | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
    | CSV                | YES     | CSV storage engine                                             | NO           | NO   | NO         |
    | ARCHIVE            | YES     | Archive storage engine                                         | NO           | NO   | NO         |
    +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+


    数据库日志报错部分:


  • 相关阅读:
    浏览器返回按钮不会触发onLoad事件
    TCP慢启动算法
    TCP协议三次握手过程分析
    关于新增和编辑
    Mock, 让你的开发脱离接口
    到底数据驱动是个什么玩意
    pagination分页插件
    关于状态切换
    在线占位图网站
    Arduino nano 与 w5500模块的连接与调试
  • 原文地址:https://www.cnblogs.com/reblue520/p/6239828.html
Copyright © 2011-2022 走看看