Question

When recovering a MyISAM table the only file that is strictly needed is the data file (tablename.MYD) - the rest of the files (the index file tablename.MYI and tablename.frm) can be recreated from the data file using REPAIR TABLE.

Assume I'm using InnoDB (with the "innodb_file_per_table" setting) instead - what is the minimum set of files needed to recover a database table from file?

Was it helpful?

Solution

As long as you have the data file and the log files then InnoDB will be able to recover. See this page (and containing chapter) on MySQL.com for more. InnoDB recover is quite different to MyISAM in that is more "built-in" as it were.

OTHER TIPS

To recover MyISAM table you need frm and MYD file. myisamchk can rebuild the index (MYI file)

For InnoDB - depends on innodb_file_per_table. If it's OFF (default), your data in ibdata1. But you need .frm file too. If it's ON - you need ibdata1, the respective .ibd and .frm file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top