1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How to enable slow query log

Discussion in 'Plesk for Linux - 8.x and Older' started by Konstantin2, Oct 7, 2007.

  1. Konstantin2

    Konstantin2 Guest

    0
     
    Hello, I added a line to my.cnf to log slow queries, but the log is not being created. I pointed it to /var/log/ and called it mysql-slow.log but nothing. I tried to create the file manually but it didnt save in that folder.

    What am I doing wrong? (using fedora core6).
     
  2. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Create the file
    Code:
    touch /var/log/mysql-slow.log 
    chmod 644 /var/log/mysql-slow.log 
    chown root:root /var/log/mysql-slow.log 
    
    Then in the /etc/my.cnf under the [mysqld_safe] or [mysqld] section
    Code:
    log-slow-queries=/var/log/mysql-slow.log 
    
    if its not saving anything then perhaps you have nothing to save :)
     
Loading...