Q. I'm moving my server from local data center to another data center. I've new server up and running. My site is dynmic and I'd like to transfer MySQL database from old server to new server. How do I make transfer smooth and successful?
A. The best and secure way is to use ssh to transfer database to another server. You need to use following tools:
=> SSH client
=> SSH Server on remote box
=> mysqldump command
=> UNIX pipes
Let us say you would like to Transfer MySQL database called foo to remote box called bar, enter the following command at shell prompt:
$ mysqldump foo | ssh user@remote.box.bar.com mysql foo
You can just copy table called chocolate (from recipe database) to remote database called icecream using same syntax:
$ mysqldump recipe chocolate | ssh user@remote.box.com mysql icecream
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- My 10 UNIX Command Line Mistakes
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
- Email FAQ to a friend
- Download PDF version
- Printable version
- Comment RSS feed
- Last Updated: 10/8/07



{ 1 comment… read it below or add one }
This is by far the most useful ssh usage I ever seen. Thanks for the tip.