Skip to content

Instantly share code, notes, and snippets.

@thelebster
Created February 4, 2014 03:48
Show Gist options
  • Save thelebster/8797865 to your computer and use it in GitHub Desktop.
Save thelebster/8797865 to your computer and use it in GitHub Desktop.
Using gzip and gunzip with mysql to import/export backups
Exporting:
mysqldump -u user -p database | gzip > database.sql.gz
Importing:
gunzip < database.sql.gz | mysql -u user -p database
@LaClon
Copy link

LaClon commented Feb 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment