LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-01-2004, 02:18 PM   #1
nbier
LQ Newbie
 
Registered: Aug 2004
Distribution: SuSE
Posts: 9

Rep: Reputation: 0
How to copy mysql db's from hardisk to new server?


My server was cracked and left in a non bootable state. I've built a new server w/ a fresh install and have mounted the old hard disk so that I can recover data.

I'm trying to get the old databases (/var/lib/mysql) and somehow move or import them into the new mysql server. Any of the advice that I've found so far has not worked because it all requires the old server to be running (hotcopy, mysqldump, etc, etc).


Does anyone have any suggestions for moving the databases as they exist in the old filesystem and importing them into the new server?

Thanks!

OS: SuSE 9.0
Mysql: 4.0.15-Max
 
Old 09-01-2004, 02:34 PM   #2
nbier
LQ Newbie
 
Registered: Aug 2004
Distribution: SuSE
Posts: 9

Original Poster
Rep: Reputation: 0
OK, managed to solve it. In case anyone else runs into it, simply shutdown mysql and delete all directories in /var/lib/mysql. There should only be two: mysql and test. Then copy over all of the directories from the same location on the old harddrive--make sure that you retain earlier permissions (cp -rp). Restart mysql and run some queryies to see if you're back up and running.
 
Old 09-01-2004, 02:36 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
I would have thought that mysqldump and restore would
be a cleaner way ;)


Cheers,
Tink
 
Old 09-01-2004, 02:38 PM   #4
nbier
LQ Newbie
 
Registered: Aug 2004
Distribution: SuSE
Posts: 9

Original Poster
Rep: Reputation: 0
Doesn't that require?

I thought mysqldump required a running server? I'll confess to not RingTFM, I just assumed that the old server would have still needed to be running for mysqldump to work.
 
Old 09-01-2004, 03:24 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Nope, you're absolutely right. I was assuming that
there's an easy way of booting the box off a recovery
CD ...


Cheers,
Tink
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy support-files/mysql.server, how do I tommytomato Fedora 2 11-13-2009 10:58 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
"which files to copy to hardisk for Hardisk installation " Rehan1 Linux - Newbie 9 08-21-2004 03:11 PM
Backing up large MySQL DB's WeNdeL Linux - Software 5 11-29-2003 09:34 AM
Lost all my MySQL DB's, help amp2000 Linux - General 7 04-17-2003 01:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:53 AM.

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