Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007

    Smile Unanswered: mysql-slow log is not creating

    to create mysql slow log I do following step

    1- in my.cnf I type

    log_slow_queries = /var/log/mysql/mysql-slow.log
    long_query_time = 1

    /sbin/service mysqld stop
    /sbin/service mysqld start --log-slow-queries=/var/log/mysql/mysql-slow.log

    I tried in one machine mysql-slow.log file file is created but when i tried to other machine file does not create

    What could be the problem?

  2. #2
    Join Date
    Aug 2008
    It could be that there are no slow queries on this server yet. I have only gotten into one situation where I really needed to log slow queries, so I could hunt down who needed to index. Perhaps post the information about the version of OS and version of MySQL you are running on both the one that works and the one that doesn't so we can look for differences.

  3. #3
    Join Date
    Aug 2008
    Pardon the second post seconds after the first, but it is early in the morning and often I have to read something several times for it to completely sink in. So the file (empty or not) does not create. I would also want to know the ownership and permissions of the /var/log/mysql directory, perhaps in both the server that it works compared to the server that is not working, so we can see the differences. Perhaps check the mysql log file to see if there are any errors or messages related to this issue.

    Also I believe you do not need to start the service with --log-slow-queries=/var/log/mysql/mysql-slow.log, due to the fact that you put it into the configuration file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts