Created
September 21, 2010 14:49
-
-
Save rgo/589780 to your computer and use it in GitHub Desktop.
MySQL delete all tables
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
#!/bin/bash | |
MYSQL="mysql -h HOST -u USERNAME -pPASSWORD -D DB_NAME" | |
$MYSQL -BNe "show tables" | awk '{print "set foreign_key_checks=0; drop table `" $1 "`;"}' | $MYSQL | |
unset MYSQL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment