Skip to main content

Slow queries not being logged

Comments

7 comments

  • cPanelMichael
    Hello :) What version of MySQL is installed on your system? I notice you have two entries for "slow_query_log_file" in your /etc/my.cnf file. Thank you.
    0
  • mk2mark
    I'm using version 5.6. Just removed the second entry (duh), still no queries being logged.
    0
  • cPanelMichael
    Have you restarted MySQL after making the change? Also, have you tested running a slow query to verify no entry is added? EX: [url=http://dba.stackexchange.com/questions/7777/write-a-slow-query-to-test-slow-query-logging]mysql - Write a slow query to test slow query logging? - Database Administrators Stack Exchange Thank you.
    0
  • mk2mark
    Yes and yes, I ran the following: SELECT SLEEP(10);
    0
  • cPanelMichael
    You might try changing the log file to a path such as: /var/lib/mysql/log-slow-queries.log It shouldn't make a difference, but it's worth attempting. Also, make sure you create the log file before entries are populated. Thank you.
    0
  • mk2mark
    No difference as you guessed.
    0
  • cPanelMichael
    Feel free to open a support ticket so we can take a closer look and see if you've made a simple mistake in the /etc/my.cnf file. You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0

Please sign in to leave a comment.