If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Log Slow queries

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-08-04, 18:00
pranav610 pranav610 is offline
Registered User
 
Join Date: Jan 2004
Posts: 25
Log Slow queries

I donot have a my.cnf file. I have hard coded values for msl to log slow queries in mysql.server script.

Code:
.
.
.

'start')
# Start daemon

if test -x $bindir/mysqld_safe
then
# Give extra arguments to mysqld with the my.cnf file. This script may
# be overwritten at next upgrade.
$bindir/mysqld_safe --log-slow-queries=/usr/local/mysql/logs/ --long_query_time=2 --datadir=$datadir --pid-file=$pid_file >/dev/null 2>&1 &
# Make lock for RedHat / SuSE
if test -w /var/lock/subsys
then
touch /var/lock/subsys/mysql
fi
else
echo "Can't execute $bindir/mysqld_safe from dir $basedir"
fi
.
.
code

MySQL will not log em.

Do I really need a my.cnf file or is there a way to work with the above code
Reply With Quote
  #2 (permalink)  
Old 03-09-04, 04:40
omiossec omiossec is offline
Registered User
 
Join Date: Jan 2003
Location: Paris, France
Posts: 320
You need to use a file not a dir

--log-slow-queries=/usr/local/mysql/logs/slow_query_logs.logs
__________________
Olivier Miossec
--
http://www.lasso-developpeur.net/
--
Reply With Quote
  #3 (permalink)  
Old 03-10-04, 08:37
pranav610 pranav610 is offline
Registered User
 
Join Date: Jan 2004
Posts: 25
Thank you.

Worked like a Charm
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On