2016-04-01 29 views
1

İyi günler,Boş Yavaş Sorgu Günlüğü

biz "/var/log/mysql/localhost-slow.log" adresindeki yavaş sorgu günlük dosyasına erişebilmek için çalışıyoruz ama dosya boş gibi görünüyor. "! INCLUDEDIR /etc/my.cnf.d" "my.cnf" dosyasını diyor ve aşağıdaki dosyaları var bu dizinin içindeki:

mysql-clients.cnf; 
server.cnf; 
tokudb.cnf; 

"server.cnf" baktığımızda benzediğini dosyası yavaş sorgular günlükleri yazmak için düzgün ayarlanmış:

# 
# These groups are read by MariaDB server. 
# Use it for options that only the server (but not clients) should see 
# 
# See the examples of server my.cnf files in /usr/share/mysql/ 
# 

# this is read by the standalone daemon and embedded servers 
[server] 

# this is only for the mysqld standalone daemon 
[mysqld] 
slow-query-log = 1 
slow-query-log-file = /var/log/mysql/localhost-slow.log 
long_query_time = 1 
log-queries-not-using-indexes 
# this is only for embedded server 
[embedded] 

# This group is only read by MariaDB-5.5 servers. 
# If you use the same .cnf file for MariaDB of different versions, 
# use this group for options that older servers don't understand 
[mysqld-5.5] 

# These two groups are only read by MariaDB servers, not by MySQL. 
# If you use the same .cnf file for MySQL and MariaDB, 
# you can put MariaDB-only options here 
[mariadb] 

[mariadb-5.5] 

Biz 'AÇIK' KÜRESEL general_log = sET denedim; ama yardımcı olmadı. Sorun ne olabilir diye bir fikrin var mı?

cevap

0

gerçekten bu dosyayı okuma emin olun:

mysqld --verbose --help | head -33 

Muhtemelen

Default options are read from the following files in the given order: 

dosya yollarından bir listesini takip göreceksiniz. `Varsayılan seçenekler aşağıdaki sıralamaya göre aşağıdaki dosyalardan okunmaktadır:

+0

Rick, teşekkürler bu girdidir /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf' - Bu server.cnf okunmuyor mu demek? – Lightbox

+0

'% log%' gibi gösterme değişkenlerini çalıştırdık, ayrıca her şey iyi görünüyor: ' slow_query_log | ON slow_query_log_file | /var/log/mysql/localhost-slow.log long_query_time | 1.000000 min_examined_row_limit | 100 ' Ayrıca 'select sleep (2);' ve sonra 'Slow_queries' gibi durumu göster '; ancak sonuç şuydu:' Slow_queries | 0 ' – Lightbox

+0

'min_examined_row_limit = 100', Uykunuzu filtreledi. –

İlgili konular