MariaDB configure slow logs to only log certain commands

You are viewing an old version of this question. View the current version here.

Hello I'm new to MariaDB but am tasked to configure it already. I've scouted the internet before i went here to ask my question, i'm sorry if this has been asked before but. when i add something to my mariaDB through my laravel website.

I've SET GLOBAL long_query_time = 5; and tested it with a sleep(6);

resulting in me seeing the command.

my question however is, is it possible (and how) to make my slow log, only log every SELECT UPDATE POST and DELETE that's been executed.

I'm looking forward to working with MariaDB more and hearing from you.

Thanks in advance

Arno.

Answer

You don't have complete flexibility to decide what queries are logged, but can use the log_slow_disabled_statements, log_slow_admin_statements and log_slow_filter variables to get as close as you can.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.