How to Fix MySQL Error 3949 (ER_IMP_INCOMPATIBLE_CFG_VERSION)
You see mysql error 3949 when a tablespace metadata file does not match your server version. To fix this issue, generate a new export from a matching database version or omit the metadata file. Database teams often move single tables between servers for backups or tests. This method is fast because it copies the raw data file. Still, strict file checks can block the transfer. What causes mysql error 3949 in your database The database engine uses the symbol ER_IMP_INCOMPATIBLE_CFG_VERSION and
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You see mysql error 3949 when a tablespace metadata file does not match your server version. To fix this issue, generate a new export from a matching database version or omit the metadata file.
Database teams often move single tables between servers for backups or tests. This method is fast because it copies the raw data file. Still, strict file checks can block the transfer.
What causes mysql error 3949 in your database
The database engine uses the symbol ER_IMP_INCOMPATIBLE_CFG_VERSION and SQLSTATE HY000 for this failure. It shows the message that the import failed because the CFG file version is not compatible with the current version.
When you export a table for transport, the engine writes two main files. One file holds the raw table rows and indexes. The second file is a metadata file with a CFG extension.
This metadata file stores the table schema format and internal version numbers. As the database engine grows, developers update this metadata file format. New features like instant column changes need new metadata layouts.
When you import the table on a target server, the engine reads the metadata file first. It compares the version number inside the file against its own supported version number.
If the source server is newer than the target server, the version numbers will not match. An older server cannot read a newer metadata layout. A very old export file can also fail on a much newer server.
When the engine spots this mismatch, it stops the import right away. It throws mysql error 3949 to protect your data from corruption.
How to diagnose and fix the failure safely
Start by checking the exact engine version on both the source and target servers. Look at the error log on the target server to see the two version numbers in the message.
MySQL Access Governance + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
The safest fix is to align your server versions before you move raw files. Upgrade the older server or use a staging instance that matches the target version.
Run the table export again on the matching server. This step creates a fresh metadata file with the right version number. Copy both the data file and the new metadata file to your target server.
Sometimes you cannot change the server versions right away. In that case, you can remove the incompatible metadata file from the target data folder before the import.
When you run the import without the metadata file, the engine skips the version check. Still, both tables must have the exact same schema structure. The engine will write a warning to the log, so test this step in staging first.
If a schema check is mandatory, do not use raw file copies across different versions. Use a logical dump tool to export the table rows as plain text statements instead.
How to prevent tablespace import errors in production
Raw file imports require direct file system permissions and high database privileges. Granting broad host permissions to fix a broken import creates security risks for your team.
Standardize your database versions across all staging, backup, and production hosts. When every server runs the same release, your metadata files will always match.
Keep strict rules on who can run schema changes and file imports. Log every admin query and review table structures before you move data between hosts.
Check MySQL queries and results on the wire
MySQL grants control who logs in. They do not check single queries or mask sensitive columns once a session starts. With hoop.dev, you run an open-source proxy, a sidecar for your MySQL, inline in the MySQL wire protocol. On every query an AI agent or human runs against production MySQL, RDS, or Aurora, hoop.dev decides to pass, mask, block, or hold it for review.
Multi-statement batches and prepared queries are split and checked one by one by hoop.dev guardrails, which refuse banned queries with a native MySQL error or hold risky ones for approval. On the response path, hoop.dev data masking rewrites string values in returned rows in memory, and every decision is logged. See the MIT-licensed project on GitHub.
Frequently asked questions
What is the CFG file in a MySQL tablespace import?
The CFG file is a metadata file created when you prepare a table for export. It holds schema details that the target server checks during the import.
Can I import a tablespace without the CFG file?
Yes, you can delete the CFG file and import the raw data file alone. You must make sure the source and target table schemas match on all column.
Does a logical backup trigger ER_IMP_INCOMPATIBLE_CFG_VERSION?
No, logical backups rebuild the table using standard text queries instead of raw files. They do not use CFG metadata files and will never trigger this error code.
Related guides
In this post