Created
October 21, 2015 05:52
-
-
Save arpitr/96e8a5064349b81af2a9 to your computer and use it in GitHub Desktop.
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 <hostname> -u <username> -<password> -D <DATABASENAME>" | |
$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