Skip to content

Instantly share code, notes, and snippets.

@rxnlabs
Created March 5, 2015 16:08
Show Gist options
  • Save rxnlabs/82c84ad569093445499c to your computer and use it in GitHub Desktop.
Save rxnlabs/82c84ad569093445499c to your computer and use it in GitHub Desktop.
MySQL - Drop All Tables in a database (without dropping the database) using the command line.
mysqldump -u db_user -p db_password -h db_host --add-drop-table --no-data db_name | grep ^DROP | mysql -u db_user -p db_password -h db_host db_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment