Skip to content


Activate slow queries log

If your mysql database is not as fast as it used to be, maybe it is a good idea to activate the slow queries log. Add the following lines in your .my.cnf file:

CODE:
  1. [mysqld]
  2. log_slow_queries=/var/log/mysql-slow-queries.log
  3. long_query_time=2

All the queries that take more than 2sec to execute will be logged in the /var/log/mysql-slow-queries.log file

Posted in mysql.


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Terabanitoss says

    Hi
    You are The Best!!!
    Bye



Some HTML is OK

or, reply to this post via trackback.