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

前端 未结 8 996
情歌与酒
情歌与酒 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条回答
  •  盖世英雄少女心
    2020-11-28 20:14

    Find log enabled or not?

    SHOW VARIABLES LIKE '%log%';
    

    Set the logs:-

    SET GLOBAL general_log = 'ON'; 
    
    SET GLOBAL slow_query_log = 'ON'; 
    

提交回复
热议问题