how do you log slow queries on mysql 5.0

Discussion in 'Databases' started by mumfry, Aug 29, 2010.

  1. #1
    am trying to log slow queries on my server.
    but i cant seem to get it enabled
    this i what i haved tryed so far

    [mysqld]
    long_query_time = 1
    log-slow-queries = /var/log/mysql/mysql-slow.log

    but when i check the location the file mysql-slow.log is not there
    any body know whats going on here please let me know
    any help would be greatly appreciated
     
    mumfry, Aug 29, 2010 IP
  2. elicitservers

    elicitservers Peon

    Messages:
    714
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Try running these commands:
    Restart MySQL and it should be working now. I think... :)
     
    elicitservers, Aug 29, 2010 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    I would also add in:

    log-queries-not-using-indexes
     
    jestep, Aug 30, 2010 IP
  4. mumfry

    mumfry Active Member

    Messages:
    118
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #4
    tanks guys
    just what i was looking for
     
    mumfry, Aug 30, 2010 IP