2016-04-01 2 views
1

こんにちは、空のスロークエリのログ

我々は「/var/log/mysql/localhost-slow.log」で私たちのスロークエリログファイルへのアクセス権を持ってしようとしているが、ファイルが空であるように見えます。 「!includedir以下/etc/my.cnf.d」を「my.cnfの」ファイルは述べていますし、そのディレクトリ内で、私たちは、次のファイルを持っている:

、それがどのように見える「server.cnf」ファイルを見る
mysql-clients.cnf; 
server.cnf; 
tokudb.cnf; 

遅いクエリログを書き込むように正しく設定されています:

# 
# 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] 

SET GLOBAL general_log = 'ON';それは助けにはならなかった。問題になる可能性のあるアイデアは何ですか?

答えて

0

それは本当に、そのファイルを読み込んでいることを確認します。

mysqld --verbose --help | head -33 

おそらく

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

は、ファイルパスのリストが続くでしょう。 は `デフォルトのオプションが与えられた順序で、次のファイルから読み込まれます:

+0

リックは、感謝これは、入力された /etc/mysql/my.cnfな/etc/my.cnf〜/ .my.cnf' - それはserver.cnfを読んでいないことを意味しますか? – Lightbox

+0

'%log% 'のような' show variables'も実行しましたが、すべてが正常であるように見えます: ' slow_query_log | ON slow_query_log_file | /var/log/mysql/localhost-slow.log long_query_time | 1.000000 min_examined_row_limit | 100 ' 'sleep(2);を実行してから' Slow_queries 'のようなステータスを表示しますが、結果は' Slow_queries | 0' – Lightbox

+0

'min_examined_row_limit = 100'はあなたの睡眠を除外しました。 –