Copy Database directly to another Database

You can directly copy a database from one host to another host like this:

$> mysqldump -u SOURCE_DB_user --password=SOURCE_DB_pass -h SOURCE_DB_HOST SOURCE_DB_name | mysql -u DB_user --password=DB_pass -h DB_host DB_name

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.