MySQL 5.6-innodb import Improvement
Before MySQL 5.6, the idb file for importing a single innodb table must be aligned with the tablespace id. If the tablespace id is inconsistent, you need to increase the tablespace id by creating a new table in the new database, so that the tablespace id is aligned.
Versions later than version 5.6
Alter table... import tablespace
You do not need to align the tablespace id.
Alter table... for export
5.6 added the above command to keep exported idb files in the same state and generate the file. cfg suffix file. When we need to copy a single table, directly copy the. frm/. idb/. cfg file and then execute
Alter table... import tablespace
You can import.
After 5.6.8, you can directly copy the idb file and structure file without generating the cfg file! However, the following alarm is generated:
Warning Code: 1810
InnoDB: IO Read error: (2, No such file or directory) Error opening './test/log_table_cube.cfg', will attempt to import without schema verification
Note: after the table is locked with for export, remember to unlock tables after the replication to release the lock!
Startup, shutdown, and restoration of the InnoDB Storage Engine
MySQL InnoDB independent tablespace Configuration
Architecture of MySQL Server layer and InnoDB Engine Layer
InnoDB deadlock Case Analysis
MySQL Innodb independent tablespace Configuration
This article permanently updates the link address: