Remove all tables with a certain pattern from the database


/ Published in: Bash
Save to your folder(s)

This script removes (DROPS) all tables that start with foo_. Usefull if you had some CMS or application that (ab)uses table prefixing, and want to clean 0ut your database.

NOTE: the data is remove FOREVER! So take good casre: make backups and all the likes. Try on a test-database first!

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.