From 493d9c395f801dac1a696c2b5e41f7ec7741c1d1 Mon Sep 17 00:00:00 2001 From: Chris Burgess <chris@giantrobot.co.nz> Date: Thu, 30 Mar 2017 18:40:10 +1300 Subject: [PATCH] Add details for MySQL query log --- docs/dev-tools/debugging.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/dev-tools/debugging.md b/docs/dev-tools/debugging.md index 3c0295a8..ffc3a22b 100644 --- a/docs/dev-tools/debugging.md +++ b/docs/dev-tools/debugging.md @@ -84,11 +84,17 @@ The following values can be added to your site's settings file `civicrm.settings ## Viewing a query log from MySQL -Outside of CiviCRM, the MySQL database software has features to enable the logging of all queries it receives. +Outside of CiviCRM, the MySQL general query log allows MySQL to log all queries. This is a performance killer, so avoid using it in production! -*TODO: how do we enable?* +* [MySQL reference: General Query Log](https://dev.mysql.com/doc/refman/en/query-log.html) +The relevant settings are: + # Location of the query log + general_log_file=/tmp/mysql.log + # Enable/disable the query log + general_log=1 + # oops, a typo ## Changing source code -- GitLab