Skip to content

Instantly share code, notes, and snippets.

@saghul
Created April 8, 2014 22:06
Show Gist options
  • Save saghul/10200313 to your computer and use it in GitHub Desktop.
Save saghul/10200313 to your computer and use it in GitHub Desktop.
Drop all tables in a MySQL DB
# You can thank https://twitter.com/miguel2angel
mysql -N -e "SELECT CONCAT('DROP TABLE ', GROUP_CONCAT(table_name), ';') FROM information_schema.tables WHERE table_schema = 'dbName'" | mysql dbName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment