Issue with logging slow queries to TABLE, variable log_output is set to FILE during mysqld run
Posted by: Mariusz Zalewski
Date: July 12, 2019 09:03AM

Hello,

I have an issue with logging slow queries to the TABLE on one of MySQL 5.7 instances. The configuration seems to be OK on this instance - it worked for months. I administrate other instances with such settings without the issue described below.

When I start mysqld configuration file (Centos /etc/my.cnf) has these parameters:
log_output=TABLE
log-slow-admin-statements
slow-query-log
long_query_time=1

So mysqld should log into mysql.slow_log table every query that takes more than 1 second.

After restarting mysqld I'm checking manually what is the value for log_output variable:
[mysql]> show variables like '%log_output%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_output | TABLE |
+---------------+-------+
1 row in set (0.00 sec)


I can even generate query that takes more than 1 seconds and it is logged correctly to mysql.slow_log table

But in less than a minute after mysqld started the log_output variable mysteriously (for me) changes the value to FILE and slow queries are not logged to TABLE.

Tried to recreate mysql.slow_log table, tried to start mysqld with "-log-output=TABLE" parameter - did not solve the issue. Mysqld has a log_output variable set to TABLE for a few moments and then changes that to FILE.

Any suggestion? What can be the source of the issue? How to investigate the problem and solve.

Best regards,

Options: ReplyQuote


Subject
Written By
Posted
Issue with logging slow queries to TABLE, variable log_output is set to FILE during mysqld run
July 12, 2019 09:03AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.