Skip to content

Instantly share code, notes, and snippets.

@djburdick
Last active December 16, 2015 20:10
Show Gist options
  • Select an option

  • Save djburdick/5490682 to your computer and use it in GitHub Desktop.

Select an option

Save djburdick/5490682 to your computer and use it in GitHub Desktop.
mysql drop tables that begin with. #mysql
mysql -u user -p[password] -Nse "show tables like 'tmp%'" database -h host.colo | while read table; do mysql -u user -p[password] -e "drop table $table" database -h host.colo; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment