-
Written By Khushboo Maurya
-
Updated on August 12th, 2026
If you’re reading this, something already went wrong. The MySQL service won’t start, or your information_schema sees the tables, but every query returns empty, or your data directory got copied off a dead server and now sits on your desk as a folder full of .frm, .ibd, .myd, and .myi files with no .sql dump in sight.
This guide covers every working recovery path in 2026, split by MySQL version, storage engine, and what you actually have on disk. It also tells you when the manual route stops working, and you need Cigati MySQL Database Repair Tool — which is not the answer to every case, only some.
Two engines, four extensions.
| Engine | Schema | Data | Indexes |
| InnoDB (default since MySQL 5.5) | .frm (up to MySQL 5.7) | .ibd for file-per-table setups, or a shared ibdata1 file for the old system tablespace | .ibd |
| MyISAM | .frm | .myd | .myi |
In MySQL 8.0, Oracle removed .frm files. Table metadata now lives in a data dictionary inside InnoDB tablespaces, plus a Serialized Dictionary Information (SDI) block written directly inside every .ibd file. Per the MySQL 8.4 Reference Manual, .frm, .par, .TRG, .TRN, and .opt files no longer exist.
Check your version on any surviving files before you touch them: wrong tool, wrong version, dead data.
Copy the entire data directory to a second location. Every recovery step below will fail on some tables, and you cannot go back if you’ve already overwritten the originals. Preserve file ownership (mysql:mysql) and permissions (660) when you copy — losing those will make MySQL refuse to read the files later.
This is the classic five-stage flow. It works when the files are intact but the server no longer starts, or you’re transplanting tables from a dead instance.
Same major version as the source. Do not skip this. An .ibd file from 5.6 imported into 8.0 will corrupt on first read. Create an empty database on the fresh instance:
| CREATE DATABASE recovered_db; |
You have two working options in 2026.
Option A: dbsake (recommended): It’s a single Python binary, actively used by the community, and works on Linux, macOS, and Windows via WSL:
| curl -s http://get.dbsake.net > dbsake chmod u+x dbsake ./dbsake frmdump /path/to/table.frm |
That prints the exact CREATE TABLE statement. For a whole directory:
| for tbl in `ls -1 /path/to/*.frm`; do ./dbsake frmdump $tbl | mysql -u root -p recovered_db done |
Option B: mysqlfrm (legacy): If you already have MySQL Utilities installed on an old machine:
| mysqlfrm – – server=root:password@127.0.0.1 – – port=3307 /path/to/table.frm |
The – – diagnostic flag reads the file byte-by-byte without needing a running server, but the output is less clean and misses collations on some column types.
Run the CREATE TABLE statements from Stage 2 against recovered_db. This creates fresh .frm and .ibd files in the new data directory.
For each table:
| ALTER TABLE table_name DISCARD TABLESPACE; |
This deletes the empty .ibd file MySQL just created, leaving the table schema pointing at nothing.
Copy the original .ibd from your backup into the new data directory:
| cp /backup/table_name.ibd /var/lib/mysql/recovered_db/ |
| chown mysql:mysql /var/lib/mysql/recovered_db/table_name.ibd chmod 660 /var/lib/mysql/recovered_db/table_name.ibd |
Then import:
| ALTER TABLE table_name IMPORT TABLESPACE; |
If the schema matches exactly, the table becomes queryable. If MySQL throws Schema mismatch (Table has ROW_TYPE_DYNAMIC row format, … ) or a similar error, your CREATE TABLE doesn’t match what the .ibd was built with — go back to Stage 2 and look for ROW_FORMAT, character sets, or index differences.
The .ibd file itself has the schema baked in as SDI. Extract it with ibd2sdi, which ships with MySQL 8.0:
| ibd2sdi /path/to/table.ibd > table.json |
The output is a JSON blob describing every column, index, foreign key, and property. It’s not a CREATE TABLE statement — you have to reconstruct one from the JSON. For a table with a few columns this takes minutes. For a table with 200 columns and 30 indexes, this is a full workday.
Once you have the CREATE TABLE, the rest of the flow is identical: recreate the table, DISCARD TABLESPACE, drop the original .ibd in place, IMPORT TABLESPACE.
Two catches worth knowing:
| Catch | Why it Kills the Method |
| .ibd was created by a newer MySQL 8.x version than your recovery server | Import fails with tablespace version mismatch — no way around it |
| Source server used encrypted tablespaces | Import fails without the original keyring master key — no way to recover the key from just the files |
MyISAM is dead but still shows up in legacy systems, older WordPress installs, and forum databases. Recovery is easier than InnoDB because there’s no tablespace binding.
Copy the .frm, .myd, and .myi files into /var/lib/mysql/dbname/, fix ownership to mysql:mysql, and start the server. If MySQL detects them, you’re done. If it complains that the table is marked as crashed, run:
| myisamchk – – recover /var/lib/mysql/dbname/table.MYI |
Or from inside MySQL:
| REPAIR TABLE table_name; |
If myisamchk returns errors about a corrupted index, add –safe-recover. If that fails too, the .myd file itself has damaged pages, and you’re at the same wall as a corrupted .ibd.
The manual methods above assume the files are intact and only the server or its metadata is broken. Real disasters aren’t that clean. Every DBA has seen this list:
At this point, IMPORT TABLESPACE will not work. ibd2sdi will refuse to open the file. dbsake will dump garbage. The files need forensic-level page reconstruction — reading the raw InnoDB page format, salvaging what rows are readable, rebuilding indexes from primary keys, stitching tables back together from clustered index leaves.
That is what Cigati MySQL Database Repair Tool does.
The tool is a Windows utility that reads corrupted MySQL files at the storage engine level, not through the MySQL server. It covers the cases where the manual flow above dies:
| Problem Area | How Cigati Addresses It |
| Corrupted .ibd files (IMPORT TABLESPACE fails) | Scans page-by-page, extracts readable rows, reconstructs the table |
| Missing/damaged .frm files (MySQL 5.7 and below) | Infers schema from .ibd pages and primary key structure |
| MyISAM corruption (myisamchk – -safe-recover fails) | Recovers directly from .myd/.myi files |
| “Table doesn’t exist in engine” errors | Recovers tables despite this mismatch, common after abrupt shutdowns |
| Full data directory recovery | Single-pass recovery instead of repeating the manual flow per table |
| Restoring to a live server | Restores directly into MySQL without an intermediate SQL dump |
| Verifying recovered data before production | Can export to a SQL script for inspection first |
| Version/engine support | MySQL 5.5–8.4 and MariaDB; InnoDB and MyISAM |
It does not recover data from files the disk itself lost. If the underlying storage returned zeros or bad sectors ate the pages, no software can restore what isn’t there.
The free demo does one thing: scans your files and shows you exactly what is recoverable, before you pay a rupee. If the preview shows all your tables, the paid version will save them. If the preview shows garbage, no license would have helped and you know it in ten minutes instead of three days.
Download the trial • Buy the full version
| Error String | Cause | Manual Fix | Cigati Tool? |
| Table ‘xxx’ is marked as crashed and should be repaired | MyISAM index corruption | REPAIR TABLE or myisamchk – – recover | Yes, when myisamchk – – safe-recover fails |
| InnoDB: Database page corruption on disk or a failed file read of page | Torn page in the .ibd | None reliable | Yes — page-level extraction |
| ERROR 1017 (HY000): Can’t find file: ‘table.frm’ | File missing or wrong permissions | Restore file, chown mysql:mysql, chmod 660 | Yes, when file is corrupt not missing |
| Incorrect information in file: ‘./dbname/table.frm’ | .frm corrupted or wrong version | Try dbsake frmdump; if garbage, tool | Yes |
| Table ‘x’ doesn’t exist in engine | InnoDB dictionary and .ibd out of sync | Restore whole data directory to fresh install | Yes — reads files directly |
| Tablespace has been discarded for table ‘x’ | You ran DISCARD but haven’t imported yet | Copy .ibd into place, IMPORT TABLESPACE | Not needed |
| Schema mismatch (Table has ROW_TYPE_DYNAMIC …) | Your CREATE TABLE doesn’t match the .ibd | Fix ROW_FORMAT, character set, indexes | Yes, when schema is unknown |
The manual method has saved a lot of people, and it has left a lot of people stuck. Some real cases from public forums:
| Source | Scenario | Outcome |
| DBA Stack Exchange — Buttered_Toast (Rick James 81K rep, Bill Karwin 17K rep) | Lost every database and rebuilt from .frm and .ibd files using mysqlfrm | Tool discontinued. Both experts confirmed: on MySQL 8.0, the .frm route is dead. Backups are the only answer. |
| Microsoft Learn Q&A — Mehran Mahouti, 2021 | Data center migration; raw .MYD/.MYI/.frm/.ibd files, no SQL dumps | Manual recovery worked — barely. Hours lost. His words: “I would love to have found this solution from the beginning.” |
| GitHub Gist — luqmansungkar (top reference since 2020) | Dozens of real recoveries across platforms and years | “Worked first try.” “Works on Windows.” “Works on Mac.” Also: “Three days of trying — you’re the only one who saved me.” |
The pattern is consistent. The manual method works when the files are clean, and the version is right. It fails silently when they aren’t, and you don’t find out until three days of trying.
| Signal | Value |
| Rating | 4.8 / 5 |
| Reviews | 1,256 |
| Paid customers | 10,000+ |
| Third-party review platforms | Trustpilot, G2 |
| Version | 22.0 |
| Size | 1.8 MB |
Named users on the product page:
Ans. No, MySQL 8.0 has no .frm files. If yours does, they were left behind from a 5.7 upgrade and are ignored. The .ibd files carry their own schema via SDI. Use ibd2sdi or the Cigati tool.
Ans. On MySQL 5.7 and MariaDB, yes, if you can find a copy; Oracle discontinued MySQL Utilities. dbsake is the actively maintained community replacement.
Ans. No. The manual method needs only the raw .frm / .ibd / .myd / .myi files. Cigati tool needs only the files.
Ans. On MySQL 8.0+, that’s the normal state; use ibd2sdi. On 5.7 and below, use the Cigati tool to reconstruct schema from the .ibd pages.
Ans. No. Encrypted files are unreadable at the byte level. Restore from backups, or from an unaffected replica.
Ans. No. Import requires the target server to be the same major version as the source, or newer within limits. Cross-version transplants fail with schema mismatch errors.
Ans. Manual method scales with your patience. Cigati tool handles multi-gigabyte .ibd files; recovery time depends on corruption depth, not just size.
About The Author:
Khushboo Maurya is a digital content and SEO professional focused on creating useful, search-friendly content that connects with the right audience. She specializes in content optimization, website growth, and practical SEO strategies that improve visibility, engagement, and organic reach.
Related Post