Re: MySQL auditing and tracing options

From: Radoulov, Dimitre <>
Date: Fri, 20 Mar 2020 15:49:54 +0100
Message-ID: <>

On 20/03/2020 15.35, Chris King (Redacted sender ckaj111 for DMARC) wrote:
> I'm new to MySQL (but not Oracle). I have a very complex system where
> data comes in and out and is shared between multiple applications. I
> would like to trace the data thru the system to help diagnose a severe
> performance issue. If in Oracle, I'd use auditing and tracing. I'm
> looking for something similar in MySQL. So far I've found that MySQL
> Enterprise Edition commercial editions has an audit add-on. But we
> don't use this edition. We don't want to add triggers because the
> reason I want to trace is to nail down a serious performance issue,
> and triggers will make that worse.
> What other options are there for auditing and tracing in MySQL?


the auditing depends on your MySQL implementation:  it's included in MySQL Advanced Server (the Oracle commercial version), MariaDB and Percona Server; free plugins exist for the Community version (for the cloud implementations you should follow the official documentation of the cloud provider).

For all implementations you can temporary enable the logging of all the statements with:

set global slow_query_log_file = '/path/filename';
set global slow_query_log = on;
set global long_query_time = 0;

The server could generate a lot of log and it may impact the performance so you have to keep it active for a limited time.


Received on Fri Mar 20 2020 - 15:49:54 CET

Original text of this message