lordstyx
lordstyx

Reputation: 785

Recover mysql database from data files

Recently one of my server's OS died. I only have the disk with the data left. Unfortunately the disks with the database backup was formatted by accident not long before that. So now I'm hoping I can get my database back (not only table structures but also data), but I don't really know how! I found the data .FRM files, but they don't seem to contain all the data, as they're not more than 10 KB big, and the entire database was over 3 GB.

I read something about retrieving the .MYD and .MYI files as well, but I can't find those! Only .FRM files..

Can anyone tell me what to do?

[EDIT] I wasn't able to find the .MYD and .MYI files in the data/tablename folder. I don't know if they're supposed to be there, but if not I don't know where to look for them, so maybe someone could help me out with that as well.

Upvotes: 4

Views: 1887

Answers (1)

Matteo Alessani
Matteo Alessani

Reputation: 10412

You should look at ibdata1file which should old the true data of a MySQL server. Some weeks ago I managed to recover a database from that file plus .frm files.

Generally this file is in /var/lib/mysql

Upvotes: 1

Related Questions