Created
February 16, 2012 12:12
-
-
Save mipmip/1844414 to your computer and use it in GitHub Desktop.
copy mysql database in bash
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/sh | |
export APASS=rootpassword | |
export DB=dbname | |
export DBDEST=newdbname | |
mysqldump -uroot $DB -p$APASS | mysql -uroot -p$APASS $DBDEST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment