Drop database, restore from ibdata1 (MySQL 5.0)

Posted on 2007-10-18
Last Modified: 2008-01-09
hi Experts!

I did drop database by mistake, I try to get folder if database from deleted and copy to data folder under mysql root but some table can read data (.MYD or .MYI) and some can not

How can I restore database for that

Thanks in advanced!

Question by:HuyBD
    LVL 17

    Accepted Solution

    You need the .FRM (table definition) files and .MYD (table data) files. If you're missing any of those (should be 1 of each per table) then you can not restore it. The index files (.MYI) can be recreated manually if needed...
    LVL 17

    Author Comment

    Unfortunately, the table is innoDB type, data may store in ibdata1 file with no changing  of size but no way to restore data, the tables with only .frm file doesn't exists :(

    Please give me a solution, even to forget all lost data.
    LVL 17

    Assisted Solution

    Then I'm afraid there's nothing you can do :( An old backup/dump is the only way to restore any data... No other way :(
    LVL 7

    Expert Comment

    If you had the binary logs you might be able to restore from those - but they'd need to go back to the creation of the table:

    Other than thank I think you've had it - sorry.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi ( had suggested a “sed” way, I actually shell …
    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    745 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

    17 Experts available now in Live!

    Get 1:1 Help Now