MySQL InnoDB表损坏 - 如何解决? [英] MySQL InnoDB tables corrupt -- how to fix?

查看:460
本文介绍了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天全站免登陆