User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 423,134 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,171 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums

Moving database to new server

Join Date: Jun 2007
Posts: 2
Reputation: webie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
webie webie is offline Offline
Newbie Poster

Re: Moving database to new server

  #4  
Jun 22nd, 2007
HI cscgal ,

why not use the rsync program over ssh to move your database to new server I presume this would be on linux server.

the only think is you would need to shutdown both mysql servers to use rsync as you would get database errors.

commands are very simple:
login as root with putty secure shell to server.

1. shutdown mysql databases
run command service mysql stop on both servers.

2. run rsync to move database

login to new mysql server as root and type command:

rsync -av -e 'ssh -p 22' root@old-servers-ip-address:/var/lib/mysql/yourdatabase/ /var/lib/mysql/yourdatabase/

when completed restart mysql on both servers with service mysql start

your databse should now be on the new mysql server ready for use.
Last edited by webie : Jun 22nd, 2007 at 10:39 am.
Reply With Quote  
All times are GMT -4. The time now is 7:03 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC