Created
February 11, 2016 12:29
-
-
Save pfaocle/97f099fe3b3df826d68d to your computer and use it in GitHub Desktop.
Drop all tables in DB via command line
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
#!/usr/bin | |
mysqldump -u username -p --no-data dbname | grep ^DROP > drop.sql | |
mysql -u username -p dbname < drop.sql | |
rm drop.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment