Solved

Need to recover MySQL database

Posted on 2010-09-14
5
511 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 78

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

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 …
Employees depend heavily on their PCs, and new threats like ransomware make it even more critical to protect their important data.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

738 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