MySQL InnoDB 表损坏——如何修复?

MySQL InnoDB tables corrupt -- how to fix?(MySQL InnoDB 表损坏——如何修复?)
本文介绍了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 表损坏——如何修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)