Turn "log slow queries" ON.

Posted by CodedK on Server Fault See other posts from Server Fault or by CodedK
Published on 2011-01-17T16:49:34Z Indexed on 2011/01/17 16:55 UTC
Read the original article Hit count: 129

Filed under:
|
|
|
|

Hello, I'm trying to log mysql slow queries, but I can't turn it on.

I will explain all my steps:

Open and Edit my.cnf and add the following lines:

long_query_time = 5 slow_query_log_file = /myfolder/slowq.log log_slow_queries = 1 =>(I have MySQL 5.0.7)

Give mysql user permitions to write on the file: chown -R mysql:mysql /var/lib/mysql

Create the file: touch /myfolder/slowq.log

Chmod for this file to 777.

service mysqld restart

From MySQL Admin Panel I can see that the "log_slow_queries" var is OFF! Also no logs are created.

Thanks in advance! Best Regards, Panos.

© Server Fault or respective owner

Related posts about mysql

Related posts about ssh