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.

Mysql-slow-queries

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

  1. ullalla

    ullalla Well-Known Member

    Joined:
    Jan 20, 2006
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    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:
    1
    try using this mysql tuner to fix the issue MySQLTuner
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    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.
     
  4. ullalla

    ullalla Well-Known Member

    Joined:
    Jan 20, 2006
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    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:
    1
    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,623
    Likes Received:
    21
    Trophy Points:
    38
    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.
     
Loading...

Share This Page