/var/log/mysql/audit.log daily rotate 30 compress delaycompress postrotate mysql -e "SET GLOBAL audit_log_rotate = ON;" endscript
SHOW STATUS LIKE 'audit_log%'; -- e.g., audit_log_current_size, audit_log_buffer_size, audit_log_lost_events (critical): percona audit plugin
(if using syslog or custom paths):
Apply filter:
"class": "table_access", "command": ["DROP", "ALTER", "TRUNCATE"], "log": true /var/log/mysql/audit
SET GLOBAL audit_log_rotate = ON; :