开发者

Recover unconnected tables from ibdata1

I'm encountering data loss of mysql, below is the steps:

1.I converted Table_A from MyISAM to InnoDB (with innodb_file_per_table OFF), saw the ibdata1 size increased;

2.Turned ON innodb_file_per_table;

3.Converted Table_A to MyISAM back, ibdata1 didn't shrink;

4.Converted Table_A to InnoDB, got Table_A.ibd file;

Now I lost the Table_A.ibd file, and want to find data back from the ibdata1 file.

I turn OFF innodb_file_per_table and tried to create the same Table_A with InnoDB format, it fails, and tell me that TABLE_A already exists, and I can't find the table from the schema.

I've searched whole internet and didn't find anything he开发者_C百科lpful, please help!


Goodle Percona data recovery toolkit. You need to:

  1. Split ibdata1 into pages (page_parser)
  2. Fetch records from InnoDB dictionary - tables SYS_TABLES and SYS_INDEXES
  3. Find index_id of your table from SYS_* tables
  4. Fetch records from pages with index_id of your table (constraints_parser tool).

UPDATE: Data recovery toolkit moved to GitHub

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜