?
Solved

Retrieve lost data MyISAM table mysql how-to

Posted on 2008-10-24
8
Medium Priority
?
696 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 600 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 1400 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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 1400 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

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

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

This article discusses how to implement server side field validation and display customized error messages to the client.
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
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 look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

762 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