Skip to content

Instantly share code, notes, and snippets.

@scmc
Created January 22, 2013 00:08
Show Gist options
  • Save scmc/4590775 to your computer and use it in GitHub Desktop.
Save scmc/4590775 to your computer and use it in GitHub Desktop.
dump all tables with a specific table prefix in MySQL
mysqldump -u root -pPASSWORD DATABASENAME `echo "show tables like 'TABLEPREFIX_%';" | mysql -u root -pPASSWORD DATABASENAME | sed '/Tables_in/d'` > db.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment