I'm trying to find out which queries are driving my database to a halt but I've got a problem actually getting the log to work. In my my.cnf I've put the following: [mysqld] slow_query_log = 1 slow_query_log_file = /var/log/slow_queries.log long_query_time = 5 I've restarted the server after this. If I go to my phpmyadmin and look at variables I can see the following: slow query log ON slow query log file /var/log/slow_queries.log If I click on Status in phpmyadmin I can see that there's been a lot of slow queries since I restarted the server. But the problem is; there is no slow_queries.log!
Okay, solved this one myself and it wasn't MySQL related. I had to create the slow_queries.log myself and then set user mysql as the owner. Once that was done it started logging.