To administer your WestHost account, please enter your
Domain Name or Server Manager Username.

WestHost: Professional Website Hosting Company








Results 1 to 10 of 12

Hybrid View

  1. #1
    Junior Member
    Join Date
    May 2007
    Posts
    7

    Default MySQL slow query log

    Is it possible to use the MySQL Server Log to log slow queries? I tried altering the my.cnf file (adding --log-slow-queries) but that did not seem to work.

    Thanks.

  2. #2
    Senior Member
    Join Date
    May 2005
    Posts
    130

    Default

    you would put "log_slow_queries" in the /etc/my.cnf file.

    and don't forget to restart your vps or restart mysqld ("/etc/rc.d/init.d/mysqld restart").

  3. #3
    Junior Member
    Join Date
    May 2007
    Posts
    7

    Default

    Thank you! I didn't know about the restarting! Am going to try first thing tomorrow...

  4. #4
    Junior Member
    Join Date
    May 2007
    Posts
    7

    Default

    Anyone know exactly where the slow query log would appear? I was assuming in the /var/lib/mysql directory, but after a day, nothing.

    Wasn't sure if the query time (I set it to "1") was long enough that my queries weren't getting caught, but I tried setting it to 0 for a few hours and still am not seeing anything.

    I've reset it it 1 for fear of creating a huge file (perhaps unfounded as my sites are LOW traffic) over the weekend.

    Insight very much appreciated... feeling very foolish!

  5. #5
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,685

    Default

    Other logs are written to /var/log. Have you checked there?
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  6. #6
    Junior Member
    Join Date
    May 2007
    Posts
    7

    Default

    I have and I'm not seeing it.

    Any other ideas appreciated. I'm going to try putting the query time down to 0 and waiting 24 hours.

Similar Threads

  1. Unable to uninstall MySQL 3.23 nor upgrade to MySQL 5
    By lifelinesfoundation in forum PHP / MySQL
    Replies: 1
    Last Post: 07-02-2007, 07:18 AM
  2. MySQL query browser?
    By distortedimage in forum PHP / MySQL
    Replies: 1
    Last Post: 11-08-2006, 05:14 PM
  3. connecting to mysql using mysqlcc
    By pinhead in forum PHP / MySQL
    Replies: 4
    Last Post: 03-11-2005, 09:23 PM
  4. Cache size in MySQL 4.1.x
    By Corrado Fiore in forum PHP / MySQL
    Replies: 0
    Last Post: 02-02-2005, 04:00 AM
  5. Replies: 0
    Last Post: 12-18-2004, 09:34 AM

Posting Permissions

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