Exporting/Importing Compressed MySQL Backups
To export the database:
mysqldump -u {username} -p {database} | gzip > backup.sql.gz
To import the previously-create backup:
gunzip < backup.sql.gz | mysql -u {username} -p {database}
(Note: Both commands will prompt you for the database password.)
Written by Colin O'Dell
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Mysql
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#