mysql删除了ibdata_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 |

+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+

数据库日志报错部分:

mysql删除了ibdata_mysql删除数据库文件ibdata1后引发的故障_第1张图片

你可能感兴趣的:(mysql删除了ibdata)