If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mysql-slow log is not creating

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-10-08, 05:48
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Smile 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

2-run
/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?
Reply With Quote
  #2 (permalink)  
Old 09-10-08, 13:42
Jonathan Kinney Jonathan Kinney is offline
Registered User
 
Join Date: Aug 2008
Posts: 5
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.
Reply With Quote
  #3 (permalink)  
Old 09-10-08, 13:50
Jonathan Kinney Jonathan Kinney is offline
Registered User
 
Join Date: Aug 2008
Posts: 5
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On