Created
July 1, 2020 07:39
-
-
Save stonecorleone/8e002df305ae91033ce045712d7e0ce8 to your computer and use it in GitHub Desktop.
Mysql command to import/export gzip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Export | |
mysqldump -u user -pupasswd my-database | gzip -c > dbfile.sql.gz | |
Multiple parts: | |
mysqldump -u user -pupasswd my-database | gzip -c > one.gz; gzip -c one.gz > two.gz; gzip -c two.gz > three.gz | |
Import | |
zcat /path/to/file.sql.gz | mysql -u 'root' -p your_database |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment