The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Correct Syntax (slow_query_log)

Discussion in 'Workarounds and Optimization' started by fdnven, Sep 3, 2013.

  1. fdnven

    fdnven Well-Known Member

    Joined:
    Feb 14, 2006
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    what is the correct syntax to enable mysql slow query log. MYSQL is set to most current version for WHM 11.38.
    Is the below correct?
    Code:
    slow_query_log
    Thanks
    Frank
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can utilize the following entries in your /etc/my.cnf file:

    Code:
    slow-query-log=1
    slow-query-log-file="/var/log/mysql-slow-queries.log"
    Ensure you create the "/var/log/mysql-slow-queries.log" file and it's owned by the "mysql" user.

    Thank you.
     
Loading...
Similar Threads - Correct Syntax (slow_query_log)
  1. ottdev
    Replies:
    7
    Views:
    382

Share This Page