How to rotate audit log manually with audit_log plugin in Percona MySQL 8.0.20?

Percona Audit log variable audit_log_flush not working.

set global audit_log_flush=1;

I want to rotate logs manually but it did not do anything ?

Hi, the parameter will close the log file and then reopen it, so the way to do it is:

  1. Move the existing file e.g.
    mv audit.log audit.log.2020103

  2. Flush
    set global audit_log_flush=1;

This will cause a new file to be created.

1 Like

@igroene I have done the same It works.

Thank you for your Response.

1 Like

glad to hear! let us know if you need further help

1 Like