开发者

Recover data from a dropped/truncated MySQL table

I just spend a few hours putting together a table full of data, and just decided to drop a WP installation in the same database. I expected WordPress to leav开发者_如何学Ce my table as it was and simply add the WP_* tables, but apparently the install wiped my database before installing the wordpress tables.

I have full access to the server root. Is there any way for me to recover this table?


I'm sorry, but that can't be done. Once a table is truncated or dropped everything is gone.

The only way to get it back would be recovering the database files from the disk, but that is not very reliable. To do that, you first have to find out where the MySQL's data files are (see this), then try using a file recovery tool to get them back. Good luck.

Another one who learns to back up the hard way.

Recover data from a dropped/truncated MySQL table


If tables were MyISAM, then I agree with NullUserException - you can't recover the tables. Well, the chance is very slim.

If InnoDB - check out my presentation on slideshare - there is a tool to extract records from raw bytes stream - percona data recovery toolkit. There are examples in the presentation, your scenario is pretty much typical.

UPDATE: Data recovery toolkit moved to GitHub

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜