Created
February 10, 2016 12:20
-
-
Save dmitriynet/f5263ced0b8ebccc694e to your computer and use it in GitHub Desktop.
Dump per tables SH
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
username=$1 | |
password=$2 | |
dbname=$3 | |
for file in *.sql; do | |
echo "${file%.sql}.sql started\n"; | |
mysql -u $username -p$password --default-character-set=utf8 $dbname < "${file%.sql}.sql"; | |
echo "${file%.sql}.sql done\n"; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment