I have the following setup on a production machine:
Mysql server 5.5.19
the active (checked the ps line) my.cnf contains:
slow_query_log
slow_query_log_file =/opt/app/mysql/log/mysqld-slow.log
long_query_time = 1
general_log = OFF
general_log_file =/opt/app/mysql/log/mysqld.log
log-queries-not-using-indexes
mysql> SHOW VARIABLES LIKE "log%"; --> shows "log_queries_not_using_indexes=ON" and "log_slow_queries=ON"
The file /opt/app/mysql/log/mysqld-slow.log exists, belongs to mysql and has zero length.
The issue is, on a test machine we had th eslow query log filling up rapidly because of the log-queries-not-using-indexes option. We disabled it because it wanst needed anyway. Now we just went live with our production db and wanted to make sur ethe same thing wouldnt happen to us, and found the same setup, but the log is empty. We can't just restart mysqld and play around because we're live now. I just want to understand why the log is empty although the config seems to indicate it should be logging lotsa queries. The general application running is identical on the production and test servers, so it's very unlikely there are actually no un-indexed queries happening.
So the question is: What other configuration can I check to see why nothing is being logged? I dont want it to be logged, I just want to be sure it won't suddenly start logging like crazy if the db server is restarted for some reason. I know I could achieve that by simply removing the option from the my.cnf but I'd also like to understand why it isnt logging right now.
Thanks, Ethan