MySQL InnoDB 表损坏——如何修复? [英] MySQL InnoDB tables corrupt -- how to fix?

查看:69
本文介绍了MySQL InnoDB 表损坏——如何修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的一个 InnoDB 表中执行条件 DELETE 操作时,显然需要在 ibdata1 中创建一些临时表,但硬盘已满,mysql 崩溃.在删除 ibdata1 文件(~30 GB)之前,我无法让它重新启动.

While performing a conditional DELETE operation in one of my InnoDB tables, which apparently required some temporary table to be created in ibdata1, the hard disk filled up and mysql crashed. I couldn't get it to start again until I deleted the ibdata1 file (~30 GB).

现在 mysql 再次启动,但数据库中的所有表似乎都已损坏(当我执行 REPAIR TABLE tablename EXTENDED 时,我得到:

Now mysql starts again, but all the tables in the database seem to be corrupt (when I do a REPAIR TABLE tablename EXTENDED I get:

+-----------------------------------+--------+----------+---------+
| Table       | Op     | Msg_type | Msg_text                      |
+-----------------------------------+--------+----------+---------+
| mydb.table1 | repair | Error    | Unknown table engine 'InnoDB' |
| mydb.table1 | repair | error    | Corrupt                       |
+-----------------------------------+--------+----------+---------+

我正在使用 innodb_file_per_table 选项,这样我的所有 .frm 和 .ibd 文件(应该分别包含元数据和数据)都完好无损(它们的文件大小与崩溃),在目录中:/var/mysql/data/mydb/.有谁知道我怎样才能让 mysql 再次用适当的数据识别这些表?

I was using innodb_file_per_table option so that all of my .frm and .ibd files (which are supposed to contain metadata and data, respectively) are all intact (with the same filesizes they had before the crash), in the directory: /var/mysql/data/mydb/. Does anyone know how I could get mysql to recognize these tables with the appropriate data once again?

谢谢!

推荐答案

没有保证,但你可能想看看:https://launchpad.net/percona-data-recovery-tool-for-innodb

No guarantees, but you may want to look at: https://launchpad.net/percona-data-recovery-tool-for-innodb

这篇关于MySQL InnoDB 表损坏——如何修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆