Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Drop database, restore from ibdata1 (MySQL 5.0)

Posted on 2007-10-18
4
Medium Priority
?
6,903 Views
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!

HuyBD
0
Comment
Question by:HuyBD
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
Aleksandar Bradarić earned 1500 total points
ID: 20099501
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...
0
 
LVL 17

Author Comment

by:HuyBD
ID: 20106377
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.
0
 
LVL 17

Assisted Solution

by:Aleksandar Bradarić
Aleksandar Bradarić earned 1500 total points
ID: 20107470
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 :(
0
 
LVL 7

Expert Comment

by:mattaob
ID: 20661803
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:

http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html

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

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

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.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

578 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