Skip to content

Instantly share code, notes, and snippets.

@aeurielesn
Created August 18, 2011 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aeurielesn/1155199 to your computer and use it in GitHub Desktop.
Save aeurielesn/1155199 to your computer and use it in GitHub Desktop.
Drop all tables from a MySQL database
$ mysqldump -u[USERNAME] -p[PASSWORD] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[USERNAME] -p[PASSWORD] [DATABASE]
#Source: Thingy Ma Jig Blog (http://www.thingy-ma-jig.co.uk/blog/10-10-2006/mysql-drop-all-tables)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment