Without going into loads of historical detail I'll just get straight to the point.

I am trying to move IBD files from one Windows server to another. MySQL is corrupt on the source server but I have a backup of the entire data directory. However, that's all I have. I do not have a mysqldump or anything of the sort, I can't generate one, so the reality is that all I have are the files.

I installed MySQL fresh on another server and copied the old schema into the new MySQL instance. All files moved over just fine with exception of the InnoDB storage engine (IBD) files, which is not a surprise.

I've tried all the suggestions I can find on the web and none of them are working. There's a nice writeup here but it does not work for me: http://www.chriscalender.com/tag/innodb-error-tablespace-id-in-file/

How can I import the IBD files into MySQL? I have all the files and I have a new MySQL instance. There must be a way to accomplish this. The above writeup seems like its sort of on the right track but it just simply does not work for my particular setup.

Any help would be greatly appreciated. Thank you!

2 Answers 2



A .ibd is not transportable. There are two alternatives:

  • Read about "transportable tablespaces".
  • Use mysqldump (or other) to create INSERT statements to recreate the table.

The .ibd is missing two things... the .frm file that gives the schema, plus some meta info in ibdata1, along with lots of other stuff for the other tables, etc.


The only way to move an .ibd file is to use FLUSH TABLES ... FOR EXPORT on the original instance to prepare the tablespace and create a matching .cfg file. The .cfg file is used by the import process on the new instance.

The procedure is documented here: https://dev.mysql.com/doc/refman/en/innodb-table-import.html

If your source instance is corrupt and you can't run FLUSH TABLES ... FOR EXPORT, then I think you're out of luck.

Restore from the most recent backup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.