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.
Use the FLUSH
TABLES statement with the FOR
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 13.7.6.3, “FLUSH Syntax” for the SQL semantics.

User Comments
Add your own comment.