Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    113
    Likes Received:
    0
    Trophy Points:
    166
    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:
    44,303
    Likes Received:
    1,847
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice