LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-10-2006, 08:45 PM   #1
JonathonReinhart
Member
 
Registered: Nov 2005
Location: Ohio
Distribution: SuSE
Posts: 34

Rep: Reputation: 15
Transferring to new server


Hello, everyone. Tomorrow night I'm moving everything on my server over to a new machine - To a 2.4GHz P4 from my 350MHz PII. I'll be doing a fresh install, naturally, and wanted a few pointers. I'm going to be installing SuSE 10.0 from the internet (using boot CD) but wanted to make suer I would be getting everything the newest. I'd like of course PHP5 and MySQL5, and the newest version of apache. I'd like to use YaST, of course, so that I can keep up with newer versions in the future, etc. Anyone have any comments here?

Also, I think I can transfer everything over pretty easy, exceppt for the MySQL database. Shouldn't I be able to just copy over the /var/lib/mysql to the new one and that will make an identical copy?

Thanks!
 
Old 03-10-2006, 09:18 PM   #2
RobertP
Member
 
Registered: Jan 2004
Location: Manitoba, Canada
Distribution: Debian
Posts: 454

Rep: Reputation: 32
The usual way to make a mysql move is to do a mysqldump on the first machine and a mysql recieving input from the result:

mysqldump -u root -p database > database.sql
This creates a text file containing all the commands to create the database on the new machine. To do the move, you may want to compress the file or tar the several files for convenience and speed.
tar czf compressedfile.tar.gz database1.sql database2.sql ...

mysql -u root -p mysql < database.sql
This runs the commands in the file to create and populate the database. You have to do this for all databases. This is also the procedure for doing backups. It is not guaranteed to migrate from one version of mysql to the next, but moving the database files is almost certain to fail because the file format often changes.

You will still have to create the user of the database and give permissions.

If the database is for a dynamic website, the database may not contain all the data but links to the storage site for files and stuff. You will need to move that as well.

Last edited by RobertP; 03-10-2006 at 09:20 PM.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Transferring MySQL DB belorion Linux - General 1 07-14-2005 09:19 AM
IO Error when transferring files. mickey_kamer Linux - General 4 03-19-2004 09:29 AM
Transferring to new HDD slackmagic Linux - General 6 08-07-2003 08:42 PM
Transferring to a new HD Citizen Bleys Linux - Hardware 3 04-01-2003 02:59 PM
transferring to netscape 6.2 BookaBear Linux - Networking 2 02-03-2002 07:41 PM

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

All times are GMT -5. The time now is 06:09 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