Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need to recover MySQL database

Posted on 2010-09-14
5
Medium Priority
?
523 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 35

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 80

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 2000 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

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

597 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