Duplicate a mysql database
From time to time you have the need to duplicate an mysql database, here's how you do it:
mysqldump -u DB_user --password=DB_pass DB_name | mysql -u DB_user --password=DB_pass -h DB_host DB_name
Source

Leave a comment