Transfer database from one server to another

Some times you want to copy a database from one server to another. This is painful and found a easy way to do it from a few other blogs

 

$ mysqldump -u username -p'password' db-name | ssh user@remote.box.com mysql -u username -p'password db-name

 

 

Advertisements

Leave a comment

No comments yet.

Comments RSS TrackBack Identifier URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s