1

The situation is that I deleted rows from the database and now they are wanted back.

There are no binary logs, and no backup.

But as I know records are not deleted instantly, they're just marked as 'deleted', but they're actually deleted only after next optimisation.

And I have just copied all the database files into safe places: frms, MIYs and MYDs. I know the structure of table I'm interested in; I can even find all deleted row ids.

Is there any tool to recover recently deleted rows?

2
  • Remember that MySQL is transactional - you may use set autocommit=0; (and should!) before all DELETES and UPDATES (and even INSERTS). This allows you to do a SELECT to make sure the proper end results. If there was a problem then you can do a ROLLBACK. Sorry for the loss of data. Tough way to learn a lesson. Hope this helps avoid it in the future. Commented Sep 21, 2011 at 19:04
  • @NatetheNoob This is TRUE for InnoDB only. Commented Sep 21, 2011 at 19:17

1 Answer 1

1

If you happen to know the offset of the data (or know some unique string) for the rows you deleted, then go ahead an pop open a hex editor and copy the (binary) data by hand. If you do recover it all you'll be extremely fortunate, and I hope you write up an article on it, because frankly I don't believe this is possible.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.