mysql $DB -u$USERNAME -p$PASSWORD -e 'show tables like "$LIKE%"' | grep -v Tables_in | xargs mysqldump --add-drop-table $DB -u$USERNAME -p$PASSWORD

Replace dollar variables with your details to drop a group of tables. Useful when you've got one database hosting a number of different web sites and you need a dump of a particular site.

MY EVENTAttend ffconf.org 2018

The UK's best JS and web development conference. 8 amazing speakers, workshops, socials — find out more & get tickets today.

Want more?

Posts, web development learnings & insights, exclusive workshop and training discounts and more, direct to your inbox.

I won't send you any spam, and you can unsubscribe at any time. Powered by ConvertKit