There are many reasons why you might copy an
InnoDB table to a different database server:
To run reports without putting extra load on a production server.
To set up identical data for a table on a new slave server.
To restore a backed-up version of a table after a problem or mistake.
As a faster way of moving data around than importing the results of a mysqldump command. the data is available immediately, rather than having to be re-inserted and the indexes rebuilt.
TABLES statement with the
EXPORT clause. This puts the corresponding
.ibd files into a consistent state so that
they can be copied to another server. You copy a
.cfg file along with the
.ibd file; this extra file is used by
ALTER TABLE ...
IMPORT TABLESPACE to make any necessary adjustments
within the tablespace file during the import process. See
Section 220.127.116.11, “
FLUSH Syntax” for the SQL semantics.