MySQL InnoDB tables corrupt -- how to fix?(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 表损坏——如何修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MySQL InnoDB 表损坏——如何修复?
基础教程推荐
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01