Skip to content

Instantly share code, notes, and snippets.

@mtrl
Created August 24, 2011 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtrl/1167685 to your computer and use it in GitHub Desktop.
Save mtrl/1167685 to your computer and use it in GitHub Desktop.
mysqldump db to db copy
Copy database and schema
---
mysqldump -u [user] -p[password] -h localhost --databases [databases] -Ccqf --no-data | mysql -u [user] -p -h [host] -P 3306
Copy data
---
mysqldump -u [user] -p[password] -h localhost --databases [databases] -Ccqf --no-create-db --no-create-info | mysql -u [user] -p -h [host] -P 3306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment