Skip to content

Instantly share code, notes, and snippets.

@MiteshShah
Created October 30, 2019 12:17
Show Gist options
  • Save MiteshShah/3c9b061679e94c36f971658273b722d7 to your computer and use it in GitHub Desktop.
Save MiteshShah/3c9b061679e94c36f971658273b722d7 to your computer and use it in GitHub Desktop.
SET GLOBAL slow_query_log = ON;
SET GLOBAL slow_query_log_file = '/var/log/mysql/mysql-slow.log';
SHOW GLOBAL VARIABLES LIKE 'slow\_%';
@MiteshShah
Copy link
Author

SET global log_output = 'FILE';
SET global general_log_file='/var/log/mysql/mysql-query.log';
SET global general_log = 1;

Log all query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment