Skip to content

Instantly share code, notes, and snippets.

@andersonsp
Created January 26, 2011 20:32
Show Gist options
  • Save andersonsp/797393 to your computer and use it in GitHub Desktop.
Save andersonsp/797393 to your computer and use it in GitHub Desktop.
duplicate a mysql database
mysqladmin create DB_name -u DB_user --password=DB_pass && \
mysqldump -u DB_user --password=DB_pass DB_name | mysql -u DB_user --password=DB_pass -h DB_host DB_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment