MySQL database frm or ibd files data Recovery,Mysql Database Recovery,Mysql table script recovery,Mysql database bulk script recovery.

Your server crashed and you recover only the frm and idb files. If you have only the idb files, 
it works also but you need the SQL scripts with the DB structure.

New MySQL instance Needed.

Step 1: Recreate the structure from the frm files
To recreate the table structure, you can use the tool "mysqlfrm”"
provided with MySQL Utilities This tool extracts the structure and create a "Create table" script.
mysqlfrm --diagnostic /usr/local/mysql/data/test/new_table.frm
mysqlfrm --server=root@127.0.0.1 --port 3307 ./new_table.frm

(Or) 3rd party url avilable:

https://recovery.twindb.com
twindb.com is discontinued., so you use MySQL utilities.
Click Here

Step 2: Recreate the table in a new database
create the new table with the script generated at the step 1. This script will create 2 files in the database data folder :

mytable.frm
mytable.idb

Step 3: Remove the new idb file
To remove the new idb file, execute the sql command :
ALTER TABLE mytable DISCARD TABLESPACE;

This command removes the link between the table and the tablespace, and removes the idb file.

Step 4: Copy the old idb fileThe idb file recovered from the old server must be copied in place of the idb file deleted at the step 3.

Step 5: Reactivate the table
ALTER TABLE mytable IMPORT TABLESPACE;

Database All Table row count
SELECT 
table_name, 
table_rows
FROM
information_schema.tables
WHERE     table_schema = 'DatabaseName' AND TABLE_ROWS<>0
ORDER BY table_name;;

Now check the table...

Video Tutorial:

Post a Comment

0 Comments