Skip to content

Instantly share code, notes, and snippets.

@pixelbrackets
Created January 7, 2013 18:47
Show Gist options
  • Save pixelbrackets/4477397 to your computer and use it in GitHub Desktop.
Save pixelbrackets/4477397 to your computer and use it in GitHub Desktop.
Use gzip for imports and exports in MySQL
#export
mysqldump -u username -p dbname | gzip > dbdump.sql.gz
#import
zcat dbdump.sql.gz | mysql -u username -p dbname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment