Percona Audit Plugin | |best|

SET GLOBAL audit_log_filter = ' ... json ... '; "audit_record": "timestamp": "2025-02-18T10:23:45.123 UTC", "id": 202502, "class": "general", "event": "status", "connection_id": 54321, "user": "webapp@10.0.1.55", "host": "10.0.1.55", "database": "ecommerce", "command": "Query", "sqltext": "UPDATE orders SET status='shipped' WHERE order_id=12345", "status": 0, "rows_examined": 1, "rows_sent": 0

(if using syslog or custom paths):

[mysqld] audit_log_rotate_on_size = 104857600 audit_log_rotations = 9 Old files: audit.log.1 , audit.log.2 , ... percona audit plugin

1. Overview The Percona Audit Log Plugin is a server-side extension for MySQL and MariaDB (primarily distributed with Percona Server for MySQL) that provides comprehensive logging of database activity. Unlike the basic general query log, the audit plugin is designed for compliance, security monitoring, and forensic analysis. It captures events such as connections, queries, table accesses, and administrative actions without impacting performance as severely as the general log. SET GLOBAL audit_log_filter = '

"class": "connection", "event": "connect", "status": 1, "log": true , It captures events such as connections, queries, table

SET GLOBAL audit_log_logging_events = 'connect,query,table_access'; :

status: 1 = failure. "rule": "class": "table_access", "table": "payments", "command": ["DROP", "TRUNCATE", "DELETE", "UPDATE"], "log": true