Solved

Retrieve lost data MyISAM table mysql how-to

Posted on 2008-10-24
8
682 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

776 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