Last active
September 4, 2016 14:07
-
-
Save kenci/97f850fba8ef1e154d435ee563166d25 to your computer and use it in GitHub Desktop.
Dump MySQL Databases
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
| mysql -u username -h hostname.lan -p databasename < piwigo.sql |
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
| #!/bin/bash | |
| echo "show databases;" | mysql -u admin --password='**' | while read databasename | |
| do | |
| echo dumping $databasename | |
| mysqldump -u admin --password='**' "$databasename" >"$databasename.sql" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment