Solved

Retrieve lost data MyISAM table mysql how-to

Posted on 2008-10-24
8
681 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
  • 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:ushastry
ushastry 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 26

Expert Comment

by:ushastry
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:
ushastry 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hacked File Timestamps 4 51
only allow numbers with preg match 4 27
myqsl update statement on phpMyAdmin 8 22
How to keep line breaks when outputting data from database 4 19
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now