Enable MySQL’s slow query log without a restart

From MyWiki
Revision as of 08:36, 18 May 2016 by George2 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Log on to mysql as root
Set the log-file location for the Slow Query log. Make sure mysql has write permission.

mysql> SET GLOBAL slow_query_log_file = '/path/to/slow_query.log';