Solved

Need to recover MySQL database

Posted on 2010-09-14
5
501 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
Comment Utility
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
Comment Utility
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 76

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Backing up data is essential for any office small or large. Most think that a simple USB drive will suffice. Even the USB drives themselves display words like backup.   Most novices will ask themselves the question “Will this work for my business…
From Coral's  "So You Want To Play With Computers" Series Preface: What follows is a tweaked reprint from 2005/06. This is a True Story. The names have been changed to protect the guilty. While this deals with a fairly simple, text file recovery…
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 tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …

744 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

8 Experts available now in Live!

Get 1:1 Help Now