content_image/747039.jpg content_image/747038.jpg
## 15.6.1.4 Moving or Copying InnoDB Tables 

•Btree pages are updated. 

•The page state is set to dirty so that it is written to disk. 

Expected error log messages for this operation: 

[Note] InnoDB: Importing tablespace for table ’test/t1’ that was exported from host ’ host_name ’ [Note] InnoDB: Phase I - Update all pages [Note] InnoDB: Sync to disk [Note] InnoDB: Sync to disk - done! [Note] InnoDB: Phase III - Flush changes to disk [Note] InnoDB: Phase IV - Flush complete 

<img src='content_image/747039.jpg'>

## Note 

You may also receive a warning that a tablespace is discarded (if you discarded the tablespace for the destination table) and a message stating that statistics could not be calculated due to a missing .ibd  file: 

[Warning] InnoDB: Table "test"."t1" tablespace is set as discarded. 7f34d9a37700 InnoDB: cannot calculate statistics for table "test"."t1" because the .ibd file is missing. For help, please refer to http://dev.mysql.com/doc/refman/8.0/en/innodb-troubleshooting.html 

This section describes techniques for moving or copying some or all InnoDB  tables to a different server or instance. For example, you might move an entire MySQL instance to a larger, faster server; you might clone an entire MySQL instance to a new replica server; you might copy individual tables to another instance to develop and test an application, or to a data warehouse server to produce reports. 

On Windows, InnoDB  always stores database and table names internally in lowercase. To move databases in a binary format from Unix to Windows or from Windows to Unix, create all databases and tables using lowercase names. A convenient way to accomplish this is to add the following line to the [mysqld]  section of your my.cnf  or my.ini  file before creating any databases or tables: 

## Importing Tables 

[mysqld] lower_case_table_names=1 

<img src='content_image/747038.jpg'>

Techniques for moving or copying InnoDB  tables include: 

•Importing Tables 

•MySQL Enterprise Backup 

•Copying Data Files (Cold Backup Method) 

•Restoring from a Logical Backup 

## Note 

It is prohibited to start the server with a lower_case_table_names  setting that is different from the setting used when the server was initialized. 

A table that resides in a file-per-table tablespace can be imported from another MySQL server instance or from a backup using the Transportable Tablespace  feature. See Section 15.6.1.3, “Importing InnoDB Tables” . 

