Restore MySQL database from data files

preview_player
Показать описание
Tried to make small experiment on recovering database structure and if possible table contents from crashed database server.
P.S. To avoid watching long video, You can click on time-codes in description.

Steps:
1. move .frm, .ibd files from mysql data directory
2. drop database and create a fresh one
3. create tables using mysqlfrm tool 01:15
4. discard tablespace from table 07:25
5. copy .ibd files to mysql data directory 09:20
6. import tablespaces 12:40
7. restart mysql

Hope You'll enjoy it and will have patience to watch it.
I tried my best from "first filming shot" :D
Рекомендации по теме
Комментарии
Автор

Thanks a lot.
mysqlfrm --diagnostic >
I am getting all table back, but some tables data showing error
when I use --
ALTER TABLE wp_posts IMPORT TABLESPACE;
it's showing --
Schema mismatch (Clustered index validation failed. Because the .cfg file is missing, table definition of the IBD file could be different. Or the data file itself is already corrupted.)

JahirulIslamMamun
Автор

Denedim hata geldi ERROR 1030 (HY000): Got error -1 from storage engine alter table discard tablespace

Makaweli