Skip to content

Instantly share code, notes, and snippets.

@mordonez
Created November 30, 2012 11:21
Show Gist options
  • Save mordonez/4175199 to your computer and use it in GitHub Desktop.
Save mordonez/4175199 to your computer and use it in GitHub Desktop.
Drop all tables in a MySQL database
; Source http://www.thingy-ma-jig.co.uk/blog/10-10-2006/mysql-drop-all-tables
mysqldump -u[USERNAME] -p[PASSWORD] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[USERNAME] -p[PASSWORD] [DATABASE]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment