Slow queries not being logged
Hi,
I have slow query logging turned on, but for some reason the log file is not being created or populated. What am I doing wrong?
I've attached my whole my.conf, feel free to point out any recommendations:
[mysqld]
federated
skip-networking
slow_query_log=1
slow_query_log_file="/home/tools/log-slow-queries.log"
long_query_time = 3
log_queries_not_using_indexes
innodb_file_per_table=1
local-infile=0
default-storage-engine=InnoDB
open_files_limit=2270
max_allowed_packet=268435456
max_user_connections=30
max_connections=500
slow_query_log_file= /home/tools/slow.logs
innodb_flush_method = O_DIRECT
innodb_log_file_size = 256M
innodb_log_buffer_size = 8M
query-cache-type = 1
query_cache_size=1024M
innodb_buffer_pool_size=1024M
join_buffer_size = 4M
table_open_cache = 700-
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 -
I'm using version 5.6. Just removed the second entry (duh), still no queries being logged. 0 -
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 -
Yes and yes, I ran the following: SELECT SLEEP(10); 0 -
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 -
No difference as you guessed. 0 -
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.
Comments
7 comments