Skip to content

Instantly share code, notes, and snippets.

@arielallon
Created September 5, 2014 18:51
Show Gist options
  • Select an option

  • Save arielallon/69e2ee51fa0e54a3a414 to your computer and use it in GitHub Desktop.

Select an option

Save arielallon/69e2ee51fa0e54a3a414 to your computer and use it in GitHub Desktop.
Drop all tables
mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "drop table $table" DATABASE_NAME; done
# http://stackoverflow.com/a/8912749/1200542
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment