Created
September 26, 2012 19:31
-
-
Save madeingnecca/3790046 to your computer and use it in GitHub Desktop.
MYSQL utils
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
# Execute query from string. | |
mysql -D <DATABASE> -h <HOST> -u <USER> -p -e 'DELETE FROM table'; | |
# Dump only tables with specific prefix. *NEEDS REVISION* | |
mysqldump -u <USER> -p <DATABASE> $(mysql -u <USER> -p -D <DATABASE> -Bse "SHOW TABLES LIKE 'PREFIX_%'"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment