Solved

Retrieve lost data MyISAM table mysql how-to

Posted on 2008-10-24
8
688 Views
Last Modified: 2013-12-13
Hi!
 i lost 99% of all my data from 2 tables of my database.

I ran a myisamchk and push the info to a txt file. I got this:
Data records:       1   Deleted blocks:     252
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
- check record links


I need to retrieve the deleted blocks since it shouldn`t have been deleted and don`t know why it is in deleted blocks.

Any idea what should i do?
0
Comment
Question by:PUB_UL
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 13

Assisted Solution

by:Xyptilon2
Xyptilon2 earned 150 total points
ID: 22797463
Have you done a

myisamchk -o table ? or a
myisamchk -r table?

This should be able to recover data

0
 
LVL 1

Author Comment

by:PUB_UL
ID: 22797685
Both of these commands doesn`t work.

Actually, it looks like i would have done a DELETE command, since my rows seems to appear in the Deleted blocks. An optimize table clear DELETED BLOCKS to make more space... but what i want is to retrieve data that would have been deleted earlier... but the thing is, we didn`t do such command.

Also, when running myisamchk, i don`t get any info telling me it is a corrupted table.

Any other idea?
0
 
LVL 26

Assisted Solution

by:Umesh
Umesh earned 350 total points
ID: 22798693
Last try would be...

Do you backup your data? If you have a  latest backup then you can restore.. you may end up losing couple of hours data...

For point in time recovery...
Is binary logging enabled???? If so then you may give try like this..

Pls do the change as required..

mysqlbinlog --database=db_name --start-date="2008-10-23 9:00:00" \
      --stop-date="2008-10-24 10:05:00" \
      /var/log/mysql/bin.xxxxxx \
   > /tmp/mysql_restore.sql

0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 26

Expert Comment

by:Umesh
ID: 22916006
Any updates on this?
0
 
LVL 1

Author Comment

by:PUB_UL
ID: 22922905
I didn`t have a backup that is why i needed to try to restore those blocks.

I haven`t been able to retrieve them so far and now i am making backup since i lost alot of data from those 2 tables.
0
 
LVL 26

Accepted Solution

by:
Umesh earned 350 total points
ID: 22922965
Is binary logging is enabled ?
I just want to know whether you tried the the thing which I suggested..  
If tried and getting any errors then let me know.
0
 
LVL 1

Author Closing Comment

by:PUB_UL
ID: 31509661
It didnt solve my problem, i haven`t found anything that could fix it, but thanks for your time...
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question