Solved

Need to recover MySQL database

Posted on 2010-09-14
5
508 Views
Last Modified: 2012-08-13
I have a hard drive that has a Fedora Core 2 Operating System on it and had recently run out of space which has been a hell to fix...

I can login to the drive and copy files... The mySQL service won't start and I was just wondering if there was any way to just copy the files from the database to another server without doing a mysqldump.

If there is what files do I need? The database is called wikidb and I don't think it's very large.
There's a folder called mysql with a directory in there called wikidb... ist hat all I need or do I need something more?

Thanks a lot in advance!!
0
Comment
Question by:keith_opswat
5 Comments
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 33678437
Can you connect a usb stick or have another linux system where you can connect nfs and do mysql dump there?
0
 
LVL 7

Expert Comment

by:tlovie
ID: 33678700
I looked at
http://articles.techrepublic.com.com/5100-10878_11-5259660.html
and it seems to indicate that you can just take all the database files under the data\ directory and move them to a new mysql installation.  Seems worth a try.
0
 
LVL 77

Expert Comment

by:arnold
ID: 33678702
As long as the mysql server that accessed the files closed cleanly, you can copy the database files as seth2740 suggested.

IF however it crashed or the space issue was on the same drive as the mysql server, you may have to run table repair and could lose data.  See if you have the binary logs as well.
0
 
LVL 14

Accepted Solution

by:
ygoutham earned 500 total points
ID: 33679031
if the tables were setup as MyISAM tables then copying the directory and changing the owner / group to "mysql" should solve the issue

for innodb there would be two large files in the mysql root directory itself.  

on a trial and error basis, i had successfully copied the entire directory and changed the ownership to get access to the db / tables.  have a clean install machine and try it to minimise any loss of data.  also you might need to have the username / passwords (assuming that was how the setup initially was).

good luck
0
 
LVL 4

Author Closing Comment

by:keith_opswat
ID: 33739211
Worked well enough... The other people didn't seem to understand that because there was no disk space I could not get the mysql server to launch. So there was no way to do a mysqldump. I was able to copy the files and it appears I was able to get a workign copy of the SQL file out of it.

The company I work for needed this because we had run some tests on our bot network for some client and they hadn't dumped the results before the server crashed.

Thanks
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

VM backups can be lost due to a number of reasons: accidental backup deletion, backup file corruption, disk failure, lost or stolen hardware, malicious attack, or due to some other undesired and unpredicted event. Thus, having more than one copy of …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
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.

773 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