Skip to content

Instantly share code, notes, and snippets.

@flrngel
Created July 8, 2014 05:50
Show Gist options
  • Save flrngel/506eb7da99c845922185 to your computer and use it in GitHub Desktop.
Save flrngel/506eb7da99c845922185 to your computer and use it in GitHub Desktop.
# backup all database
mysqldump -u "USER" --all-databases -p > "FILE_NAME".sql
# backup with single-transaction ( WHEN REPLICATE )
mysqldump -u "USER" -p "DATABASE_NAME" --master-data=2 --single-transaction > "FILE_NAME".sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment