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!

Mysql-slow-queries

Discussion in 'Database Discussion' started by ullalla, Feb 3, 2011.

  1. ullalla

    ullalla Well-Known Member

    Joined:
    Jan 20, 2006
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    166
    I am having 1 question on mysql-slow-queries.

    If we enable mysql-slow queries on server then is it possible to check the slow queries date wise at /var/log/mysql-slow-queries?


    A quick assistance is appreciated.
     
  2. coderiser

    coderiser Member

    Joined:
    Jan 31, 2011
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    51
    try using this mysql tuner to fix the issue MySQLTuner
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,609
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello ullalla,

    What MySQL version are you using? Can you please indicate which one it is and I can advise how to enable the slow query log in /etc/my.cnf for that MySQL version?

    Code:
    mysql_config --version
    Once it has been enabled, you can then view the logs at the location they will create, although I would suggest getting a script like mysqlsla at http://hackmysql.com/mysqlsla to analyze the logs for you.

    Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. ullalla

    ullalla Well-Known Member

    Joined:
    Jan 20, 2006
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    166
    i have already enabled it, my question is that can we check the logs date wise?
     
  5. Alexd790

    Alexd790 Registered

    Joined:
    Feb 25, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    I have face this type of problem, I used MySQL updated version to solve this problem.
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,609
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Is there a section for each log entry indicating something like:

    Code:
    SET timestamp=1255345490;
    If so, then these are epoch dates and you'll be able to use a converter like Date/Epoch Time Converter - JavaScript Utilities/Tools - ESQSoft to grab the date you want converted to regular times, then check through the logs for those dates. Since you haven't provided any entries from your log, I cannot state what you have in the log that might be indicating the dates and times.
     
    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