Is there any way to turn Slow queries on when MySQL server in running? Because i cannot restart MySQL server since the manager in on vacation!
            Asked
            
        
        
            Active
            
        
            Viewed 363 times
        
    1
            
            
        - 
                    1possible duplicate of [How can I enable MySQL's slow query log without restarting MySQL?](http://stackoverflow.com/questions/2403793/how-can-i-enable-mysqls-slow-query-log-without-restarting-mysql) – Haim Evgi Aug 31 '11 at 06:11
 - 
                    2This is mostly a guess backed only by reading docs, but using something like this might work: SET GLOBAL log_slow_queries = '/some/log/path', long_query_time = 1; – splitfeed Aug 31 '11 at 06:13
 - 
                    Thank you splitfeed. Why you just don't post an answer? – Aug 31 '11 at 06:14
 - 
                    Did it actually work? I doubted it would since I haven't tried it myself – splitfeed Aug 31 '11 at 06:14
 - 
                    Variable 'log_slow_queries' is a read only variable. So out of luck. :( – Aug 31 '11 at 06:18
 
1 Answers
-1
            This is mostly a guess backed only by reading docs, but using something like this might work
SET GLOBAL log_slow_queries = '/some/log/path', long_query_time = 1;
        splitfeed
        
- 94
 - 4
 
- 
                    Thanks but i think `log_slow_queries` is a read-only variable in earlier MySQL versions. – Aug 31 '11 at 06:24
 - 
                    1