Anne
Verified User
- Joined
- Dec 3, 2015
- Messages
- 72
Hi,
I'm afraid it is a very small thing, but I tried it all and can't find it.
I want to log slow querys (MariaDB 10.2). So what I did was:
in etc/my.cnf.d/server.cnf
I added below:
[mysqld]
local-infile = 0
The lines:
slow_query_log = 1
slow_query_log_file = /var/log/mysql-slow-queries.log
long_query_time = 5
Restarted the service.
Now the slow queries are counted, I can see the number increase in "Slow queries".
But the log file is not created. Also when I create the log file with all permissions to write (666) it stays empty.
If I turn on log-queries-not-using-indexes btw, then I get a lot of logging, so it seems that logging itself works...
But of course I don't want log-queries-not-using-indexes on, way too much data, even when db is optimized.
What am I missing?
I'm afraid it is a very small thing, but I tried it all and can't find it.
I want to log slow querys (MariaDB 10.2). So what I did was:
in etc/my.cnf.d/server.cnf
I added below:
[mysqld]
local-infile = 0
The lines:
slow_query_log = 1
slow_query_log_file = /var/log/mysql-slow-queries.log
long_query_time = 5
Restarted the service.
Now the slow queries are counted, I can see the number increase in "Slow queries".
But the log file is not created. Also when I create the log file with all permissions to write (666) it stays empty.
If I turn on log-queries-not-using-indexes btw, then I get a lot of logging, so it seems that logging itself works...
But of course I don't want log-queries-not-using-indexes on, way too much data, even when db is optimized.
What am I missing?
Last edited: