Skip to content

Instantly share code, notes, and snippets.

@tomykaira
Created November 15, 2014 16:53
Show Gist options
  • Save tomykaira/4c05c50472b5f316f375 to your computer and use it in GitHub Desktop.
Save tomykaira/4c05c50472b5f316f375 to your computer and use it in GitHub Desktop.
MySQL General query log without restart
/* mysql -u root */
SET GLOBAL log_output=FILE;
SET GLOBAL general_log=ON;
show variables like 'general_log%';
/*
+------------------+------------------------------+
| Variable_name | Value |
+------------------+------------------------------+
| general_log | ON |
| general_log_file | /var/lib/mysql/localhost.log |
+------------------+------------------------------+
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment