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 临时表问题 2022-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 更改自动增量起始编号? 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
