How can I enable MySQL's slow query log without restarting MySQL?

前端 未结 8 981
情歌与酒
情歌与酒 2020-11-28 19:44

I followed the instructions here: http://crazytoon.com/2007/07/23/mysql-changing-runtime-variables-with-out-restarting-mysql-server/ but that seems to only set the threshold

8条回答
  •  Happy的楠姐
    2020-11-28 20:12

    MySQL Manual - slow-query-log-file

    This claims that you can run the following to set the slow-log file (5.1.6 onwards):

    set global slow_query_log_file = 'path';
    

    The variable slow_query_log just controls whether it is enabled or not.

提交回复
热议问题