Does mysqldump --no-tablespaces dumps index files of InnoDB? I know that MyIsam uses separate index files *.MYI for index. So if one uses mysqldump with --no-tablespaces, does that mean index is not exported?

1 Answer 1


"Tablespaces" are for clumping tables into a single .ibd. The mysqldump options relating to that control whether to output the DDL statements such as CREATE TABLESPACE.

mysqldump does not dump the contents of indexes, regardless of Engine. It does dump the definitions of the indexes. When reloading, the indexes will be recreated. Yes, MyISAM has a separate file for indexes while InnoDB includes the indexes in the same "tablespace" file; but the locations of indexes is an implementation detail that does not matter when dumping and reloading tables.

If you have not explicitly created any "tablespaces", ignore options relating to them. (Very few people use tablespaces.)

  • 1
    Is a restored index really the same index? This is like one of those Star Trek transporter ethical questions, right? Sep 7, 2021 at 15:20
  • Equivalent to rebuilding the index. Same functionality, same process. If a transponder did not faithfully rebuild the item, then it would be useless. Same as creating a "new" index for the table.
    – Rick James
    Feb 22, 2023 at 19:28

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.