Last active
August 29, 2015 14:23
-
-
Save carltondickson/66cdd9293ce0cd694a7b to your computer and use it in GitHub Desktop.
MySQL toggle query logging
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
nano ~/.bash_aliases | |
alias mysql_turn_on_query_logging = "mysql -h localhost -uroot -p -e \"SET GLOBAL log_output = 'FILE'; SET GLOBAL general_log_file='/tmp/mysql_general.log'; SET GLOBAL general_log = 1;\"" | |
alias mysql_turn_off_query_logging = "mysql -h localhost -uroot -p -e \"SET GLOBAL general_log = 0;\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment