?
Solved

Need to recover MySQL database

Posted on 2010-09-14
5
Medium Priority
?
515 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 79

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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

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.
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
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 …
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
Suggested Courses

777 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