Skip to content

Instantly share code, notes, and snippets.

@stalmok
Created August 16, 2012 07:00
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 stalmok/3367578 to your computer and use it in GitHub Desktop.
Save stalmok/3367578 to your computer and use it in GitHub Desktop.
Unix CL: drop all MySQL tables
// NOT SECURE
mysqldump -u username --no-data dbname | grep ^DROP | mysql -u username
// SECURE
mysqldump -u username -p --no-data dbname | grep ^DROP > drop.sql
mysql -u username -p dbname < drop.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment