Hi, You can only set this parameters in order to monitoring slow queries:
long_query_time = 120 ( example of 2 minutes) #log-long-format #log-slow-queries=/var/log/slow-queries.log You can enable and disable using " # " You set : log=ON log_slow_queries = ON log_slow_queries=/var/log/slow-queries.log long_query_time=10 MUST BE : long_query_time = 120 log-long-format log-slow-queries=/var/log/slow-queries.log I think that 2 minutes ( for this type of log) is good number...2 minutes. The queries for more than 2 minutes of elapsed time mysql write to this log ( slow log ). Regards, Juan On 2/11/07, Pratchaya Chatuphian <[EMAIL PROTECTED]> wrote:
Hi , Everyone :: I need your help. I have problem about mysql. it about log_slow_queries this is my.cnf file ############ [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock old_passwords=1 #skip-networking skip-innodb skip-bdb skip-name-resolve skip-locking skip-character-set-client-handshake skip-thread-priority skip-name-resolve log=ON log_slow_queries = ON log_slow_queries=/var/log/slow-queries.log long_query_time=10 log-bin ############ And I have already create "slow-queries.log" in the "/var/log" But I can't success use log_slow_queries Caz, i see my log file ( /var/log/mysqld.log ) ############ 070212 00:00:05 mysqld started ^G/usr/libexec/mysqld: File '/var/log/slow-queries.log' not found (Errcode: 13) 070212 0:00:05 [ERROR] Could not use /var/log/slow-queries.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it. /usr/libexec/mysqld: ready for connections. Version: '4.1.20-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution ############ PS. " ls -l " in /var/log/ -rw-r--r-- 1 mysql mysql 0 Feb 11 21:32 slow-queries.log -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]