Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    25

    Unanswered: 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

  2. #2
    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/
    --

  3. #3
    Join Date
    Jan 2004
    Posts
    25
    Thank you.

    Worked like a Charm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •