Tables •Internals •The  innodb_file_per_table  variable must be enabled, which it is by default. •The page size of the tablespace must match the page size of the destination MySQL server instance. InnoDB  page size is defined by the  innodb_page_size  variable, which is configured when initializing a MySQL server instance. Prerequisites •If the table has a foreign key relationship,  foreign_key_checks  must be disabled before executing DISCARD TABLESPACE . Also, you should export all foreign key related tables at the same logical point in time, as  ALTER TABLE ... IMPORT TABLESPACE  does not enforce foreign key constraints on imported data. To do so, stop updating the related tables, commit all transactions, acquire shared locks on the tables, and perform the export operations. •When importing a table from another MySQL server instance, both MySQL server instances must have General Availability (GA) status and must be the same version. Otherwise, the table must be created on the same MySQL server instance into which it is being imported. •If the table was created in an external directory by specifying the  DATA DIRECTORY  clause in the CREATE TABLE  statement, the table that you replace on the destination instance must be defined with the same  DATA DIRECTORY  clause. A schema mismatch error is reported if the clauses do not match. To determine if the source table was defined with a  DATA DIRECTORY  clause, use  SHOW CREATE TABLE  to view the table definition. For information about using the  DATA DIRECTORY  clause, see Section 15.6.1.2, “Creating Tables Externally” . •If a  ROW_FORMAT  option is not defined explicitly in the table definition or  ROW_FORMAT=DEFAULT  is used, the  innodb_default_row_format  setting must be the same on the source and destination instances. Otherwise, a schema mismatch error is reported when you attempt the import operation. Use  SHOW CREATE TABLE  to check the table definition. Use  SHOW VARIABLES  to check the innodb_default_row_format  setting. For related information, see Defining the Row Format of a Table. Importing Tables This example demonstrates how to import a regular non-partitioned table that resides in a file-per-table tablespace. 1. On the destination instance, create a table with the same definition as the table you intend to import. (You can obtain the table definition using  SHOW CREATE TABLE  syntax.) If the table definition does not match, a schema mismatch error is reported when you attempt the import operation. 2. On the destination instance, discard the tablespace of the table that you just created. (Before importing, you must discard the tablespace of the receiving table.) mysql> USE test; mysql> CREATE TABLE t1 (c1 INT) ENGINE=INNODB; mysql> ALTER TABLE t1 DISCARD TABLESPACE; 3. On the source instance, run  FLUSH TABLES ... FOR EXPORT  to quiesce the table you intend to import. When a table is quiesced, only read-only transactions are permitted on the table. mysql> USE test; mysql> FLUSH TABLES t1 FOR EXPORT; FLUSH TABLES ... FOR EXPORT  ensures that changes to the named table are flushed to disk so that a binary table copy can be made while the server is running. When  FLUSH TABLES ... FOR 3021