Create MySQL-Dump, copy db to other Server and upload the db.

mysqldump -uUserName -pPassword tudb | ssh "mysql -uUserName -pPassword -h YourDBName"
This option makes a copy of your current db and via ssh it transfer to the server you specify and upload the database to the specific User & Password you specify (Note the db User & Pass, can be different from the one you use in the other server) If you are going to use "localhost" as your main db remove (-h) and youst add "localhost"

By: elecboy
2009-02-17 22:36:06

What Others Think

If you need to do this as root you've got some problems!! anyway, don't forget to add compression, MySQL dumps have lots of redundancy ssh -C
maht · 675 weeks and 2 days ago
They have provided an option to create my SQL dump and more regarding it is shared here cbd benefits which makes it easier for the people to try out the code shared and check whether it is useful or not thanks a lot for sharing it
Juvanta · 50 weeks and 3 days ago
Something so sacred so hard to replace private investigator tallahassee
tillyracker · 31 weeks and 3 days ago
seofox · 10 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: