MySQL Forums
Forum List  »  Newbie

Re: How to enable log_slow_queries and set value for long_query_time
Posted by: Srikanth Pulikonda
Date: July 10, 2007 02:53PM

Hi There,

What I suspect you might have 2 my.cnf files usually happens with default installation.

First Option.

1) /var/db/mysql/my.cnf
2) /etc/my.cnf
either you delete the file under /etc/my.cnf and create a softlink from /var/db/mysql/my.cnf to /etc/my.cnf or edit both files. I would suggest have one file to avoid confusion.

The second option is to edit the mysql startup script with the below mentioned line

command_args="--defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysq
l_args} --log-slow-queries --log-queries-not-using-indexes > /dev/null &"

Hope this helps.

All the Best
Sri

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.