There are two ways InnoDB can organize tablespaces. First is when all data, indexes and system buffers are stored in a single tablespace. This is typicaly one or several ibdata files. A well known innodb_file_per_table option brings the second one. Tables and system areas are split into different files. Usually system tablespace is located in ibdata1 file and every InnoDB table has two files e.g. actor.frm and actor.ibd.
The annoying thing about .ibd files you can’t easily copy the an .ibd file to another MySQL server. If you try to very often you’ll get an error in the log:
InnoDB: Error: tablespace id is 10 in the data dictionary InnoDB: but in file ./sakila/actor.ibd it is 15!
However sometimes you have to connect the .ibd file to an alien
ibdata1.
There are several situation when you have to:
1. ibdata1 is erroneously removed
2. ibdata1 is …
[Read more]