Skip to content

Instantly share code, notes, and snippets.

@cpinto
Created February 16, 2011 00:28
Show Gist options
  • Save cpinto/828597 to your computer and use it in GitHub Desktop.
Save cpinto/828597 to your computer and use it in GitHub Desktop.
drop all tables from a specific mysql database
mysql --silent --skip-column-names -u <username> -p<password> <database> -e "show tables" | awk '{ print "drop table " $1 ";"}' | mysql -u <username> -p<password> <password>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment