下午好,
我们试图访问位于"/var/ log /mysql/localhost-slow.log“的慢查询日志文件,但该文件看起来是空的。"my.cnf“文件显示为"!includedir /etc/my.cnf.d",在该目录中有以下文件:
mysql-clients.cnf;
server.cnf;
tokudb.cnf;查看"server.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]我们已经尝试设置全局general_log = 'ON';但是没有帮助。你知道问题出在哪里吗?
发布于 2016-04-04 04:40:42
验证它是否确实在读取该文件:
mysqld --verbose --help | head -33你可能会看到
Default options are read from the following files in the given order:后跟文件路径列表。
https://stackoverflow.com/questions/36355857
复制相似问题