Skip to content

Instantly share code, notes, and snippets.

@pfaocle
Created February 11, 2016 12:29
Show Gist options
  • Save pfaocle/97f099fe3b3df826d68d to your computer and use it in GitHub Desktop.
Save pfaocle/97f099fe3b3df826d68d to your computer and use it in GitHub Desktop.
Drop all tables in DB via command line
#!/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