Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-22-2004, 05:23 PM   #1
Registered: Mar 2004
Location: Boston
Distribution: Fedora Core 10
Posts: 58

Rep: Reputation: 15
MySQL data Location.

So here's what I did stupidly. I went out and bought a new hd. Threw the new hd in my box, installed Red Hat, and hooked up my old on as a secondary slave. Tried to boot. Since they were both boot drives it obviosly didn't want to automount the second drive. I go in, change the label of hdb1 and hdb2 to secondHD1 and secondHD2. Mounted it and it worked fine. Pulled off my files that I wanted to keep. Took out the second drive and tossed it on the shell. Two days later I realize....... I never pulled of my mysql dbs. These of which I really need (Ironically, I need them more than the files I went thru all the trouble to save). I tried putting the old hd in an old box and booting it up to dump the tables, but since I changed the labels and don't know what they should be to boot, it won't boot.
So here I am stuck. I can hook this up as a second hd and mount it fine. But where is the mysql data located? How do I get it off the second drive and put it on the new hd?
Old 12-22-2004, 05:41 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
MySQL by default will usually store its DB's in /var/lib/mysql
Old 12-22-2004, 05:58 PM   #3
Registered: Mar 2004
Location: Boston
Distribution: Fedora Core 10
Posts: 58

Original Poster
Rep: Reputation: 15
Awesome thanks. I mounted the second drive to /mnt/drive2/, copied all the files in /mnt/drive2/var/lib/mysql over to /var/lib/mysql/ and everything seems to work great.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Location of mysql logs? khwang Linux - Newbie 7 12-17-2010 07:51 AM
Location for script data storage Skazi Linux - General 1 10-15-2005 10:55 AM
MySQL Location on standard RH9 install bytebrowser Linux - Software 2 04-10-2005 06:49 AM
SUsE 8.2 MySQL data location? xardoz Linux - General 1 04-16-2004 11:26 AM
location of MySQL Directory in Red Hat meluser Linux - Software 3 04-20-2003 12:59 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:14 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration