Skip to content

Instantly share code, notes, and snippets.

@sairion
Created August 18, 2013 13:07
Show Gist options
  • Select an option

  • Save sairion/6261567 to your computer and use it in GitHub Desktop.

Select an option

Save sairion/6261567 to your computer and use it in GitHub Desktop.
drop all tables in a database (MySql)
#from http://lowendtalk.com/discussion/8203/quick-trick-drop-all-tables-in-mysql-database-in-one-step
mysqldump -u${user} -p${pass} -h ${host} --add-drop-table --no-data ${database} | grep ^DROP | mysql -u${user} -p${pass} -h ${host} ${database}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment