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         |
    +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+


    数据库日志报错部分:


  • 相关阅读:
    HDU3555:Bomb
    入门OJ:售货员的难题
    Zju1100 Mondriaan
    与图论的邂逅08:树上倍增
    入门OJ:八中生成树2
    Poj2286 The Rotation Game
    P1379 八数码难题
    [SCOI2005]骑士精神
    与图论的邂逅07:K短路
    [Usaco2007 Feb]Cow Party
  • 原文地址:https://www.cnblogs.com/reblue520/p/6239828.html
Copyright © 2011-2022 走看看