Before mysql5.6, an IDB file that imports a single InnoDB table needs to align the tablespace ID, and if the Tablespace ID is inconsistent, you need to grow the Tablespace ID by creating a new table in the new library, so that the tablespace Id.
After version 5.6
ALTER TABLE ... import tablespace
There is no need to align the tablespace ID.
ALTER TABLE ... for export
5.6 Adds the above command to keep the exported IDB file in a consistent state and generate a file. cfg suffix file. When we need a single-table copy, copy the. frm/.idb/.cfg file directly and execute it directly
ALTER TABLE ... import tablespace
can be imported .
After 5.6.8, you can import the IDB files and the structure files without having to generate the CFG files! However, the following alarms are generated:
Warning Code:1810innodb:io Read Error: (2, No such file or directory) error opening './test/log_table_cube.cfg ', would a Ttempt to import without schema verification
Note that when the table is added to the for export lock, remember unlock tables release the lock after copying it!
Resources:
Http://www.educity.cn/wenda/404363.html
Http://dev.mysql.com/doc/refman/5.6/en/tablespace-copying.html
This article is from the "original" blog, please be sure to keep this source http://qdjalone.blog.51cto.com/1222376/1423885