LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-04-2008, 06:48 PM   #1
1veedo
Member
 
Registered: Dec 2004
Location: WV, USA
Distribution: Gentoo, Debian
Posts: 186

Rep: Reputation: 34
Duplicate (or backup) SQL server


Bassically I have an sql server on one computer and I want to put it onto another. Both have mysql installed. It would be simple to just copy over the database but a backup and restore would work.

Thanks.
 
Old 06-04-2008, 07:17 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
So what's the qn?
 
Old 06-05-2008, 02:39 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Use mysqldump or shutdown the database and copy the database files over to the new server. Or you can get fancy and setup a master/slave replication to copy over. But yeah, seems like you answered your own question by saying a backup and restore would work.
 
Old 06-22-2008, 02:08 PM   #4
1veedo
Member
 
Registered: Dec 2004
Location: WV, USA
Distribution: Gentoo, Debian
Posts: 186

Original Poster
Rep: Reputation: 34
Where are the files located, trickykid?
 
Old 06-22-2008, 03:47 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally Posted by 1veedo View Post
Where are the files located, trickykid?
Well, if you perform the mysqldump yourself, then it's where ever you dumped it too. If you're wanting to just shutdown the database then copy the flat files over, then by default they're in /var/lib/mysql
 
Old 06-22-2008, 05:33 PM   #6
1veedo
Member
 
Registered: Dec 2004
Location: WV, USA
Distribution: Gentoo, Debian
Posts: 186

Original Poster
Rep: Reputation: 34
Ok copying the files failed. I was kindof hoping for an easy solution like that but oh well.

Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!

I'll just do the mysqldump. If I have any problems I'll report back.

Thanks.
 
Old 06-23-2008, 09:52 AM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Mysqldump is more reliable. But reporting that it failed, we'd need more details, log output to understand what is wrong. You might have missed an important file to copy over, etc.
 
  


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
java: SQL duplicate key exception or query for key is faster kpachopoulos Programming 1 01-06-2008 04:32 AM
sugarCRM sql backup import hua Linux - Server 1 12-09-2006 09:11 AM
dvd duplicate/backup sjmgeezer Linux - Software 6 11-25-2005 01:07 AM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 02:20 PM
Error: Acct: Couldn't insert SQL accounting START record - Duplicate entry '15212' fo ethanchic Linux - Software 0 04-11-2003 10:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:05 PM.

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