1672
MySQLERRORCommonInnoDBHIGH confidence
Table schema does not match the tablespace being imported
Production Risk
High — import fails and table is inaccessible until resolved.
What this means
During IMPORT TABLESPACE, the .cfg metadata file indicates the table schema differs from the current table definition.
Why it happens
- 1The .cfg file was generated from a different version of the table schema.
- 2The table was altered after the .cfg file was exported.
- 3Column order, types, or names differ between source and destination.
How to reproduce
trigger — this will error
trigger — this will error
ALTER TABLE t IMPORT TABLESPACE;
expected output
ERROR 1672 (HY000): Schema mismatch (Table has ROW_TYPE_DYNAMIC row format, .cfg file has ROW_TYPE_COMPACT row format)
Fix 1
Regenerate the .cfg file from the correct table version
Regenerate the .cfg file from the correct table version
-- On source server: FLUSH TABLES t FOR EXPORT; -- Copy .ibd and .cfg files to destination -- On source server: UNLOCK TABLES;
Why this works
A freshly exported .cfg file matches the current schema, resolving the mismatch.
Fix 2
Align destination table schema with source
Align destination table schema with source
-- ALTER the destination table to match the source schema before importing
Why this works
Matching schemas ensures the tablespace can be imported without error.
Sources
Official documentation ↗
MySQL 8.0 — 1672 ER_TABLE_SCHEMA_MISMATCH
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev