Last active
October 14, 2019 18:24
-
-
Save Disassembler0/db44fb84f744b84e4ed384eb6ed9d633 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -NB information_schema -e "SELECT table_name FROM tables WHERE table_schema = 'yourdb' AND table_name like 'yourprefix_%'" | xargs -n 1 -I"{}" mysql dbname -e "DROP TABLE {}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -NB information_schema -e "SELECT table_name FROM tables WHERE table_schema = 'yourdb' AND table_name like 'yourprefix_%'" | xargs -I"{}" mysqldump yourdb {} >dump.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment