Last active
March 8, 2017 08:38
-
-
Save TheRatG/5045e7616d1cfea18da94b6d7c2ce7e6 to your computer and use it in GitHub Desktop.
mysqldump help
This file contains hidden or 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
#!/usr/bin/env bash | |
USER=homestead | |
PASSWORD=secret | |
DATABASE=database | |
DB_FILE=/tmp/${DATABASE}.sql.gz | |
#dump specific table data | |
mysqldump --extended-insert --skip-lock-tables -u${USER} -p${PASSWORD} ${DATABASE} | gzip > ${DB_FILE} | |
#zcat ${DB_FILE} | mysql -u${USER} -p${PASSWORD} -D${DATABASE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment