Jump to content

[SOLVED] Recover a table?


Azu

Recommended Posts

x_x I accidently put in "delete from table" instead of "select * from table" =/

 

Is there any way that I can recover my data from it? I don't have any backups of this table..

 

 

 

Edit: I think I found a log file "ib_logfile0" can I use this to recover?

Link to comment
Share on other sites

:D well thankfully it's a MyIsam table not InnoDB!

Please tell me how do I recover my data from it? I'll be very very happy ^^

 

And I was doing a lot of work on my database, I had to delete some stuff, and I meant to replace the delete with a select but I left it by mistake :(

Link to comment
Share on other sites

:D well thankfully it's a MyIsam table not InnoDB!

Please tell me how do I recover my data from it? I'll be very very happy ^^

 

And I was doing a lot of work on my database, I had to delete some stuff, and I meant to replace the delete with a select but I left it by mistake :(

That file you referred to is InnoDB... as for MyISAM, there isn't really proper undelete:

 

No. This is not possible. When a record is deleted, the start of each of its parts ("blocks") is overwritten with linkage information. All deleted parts of all records make a link or chain.

 

Hence the records cannot be restored in full.

 

In theory one could write a utility that follows the delete link. It could extract all non-overwritten parts of the records. They will even be in correct order. But it would be impossible to automatically determine where each record ends. That information was located at the start of the first part of a record, where it is now overwritten. Also it would be difficult to guess where each column starts when the start of the record is missing.

 

Regards

Ingo

 

Ingo Strüwing, Senior Software Developer - Storage Engines

MySQL AB, www.mysql.com

 

However, you might want to check this out if you happen to be lucky enough to only use fixed length columns.

 

HTH.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.