NOTE: This process requires Linux root as well as MariaDB root user access. It would be important keep an eye on the disk-space as this additional logging would occupy ~700MB of disk-space for ~1 Million transactions processed on the appliance. |
shell> mysql -u root -p
MariaDB> select * from information_schema.plugins where plugin_name='server_audit'\GIf it reruns an empty set, it means Audit logging is not activated ; if it has been activated, the response should look similar to the following:
MariaDB> install plugin server_audit soname 'server_audit.so';
MariaDB> set global server_audit_events='QUERY_DML_NO_SELECT';
MariaDB> set global server_audit_file_rotate_size=100000000;
MariaDB> set global server_audit_file_rotations=1000;
MariaDB> set global server_audit_logging=ON;
MariaDB> show global variables like 'server_audit%';The output should look similar to the following:
NOTE: Audit logging should be enabled now; the log file can be viewed at /usr/local/strongauth/mariadb-10.5.8/ibdata/server_audit.log |
shell> cp /etc/my.cnf ~/my.cnf.backup
server_audit_logging = ON
server_audit_events = QUERY_DML_NO_SELECT
server_audit_file_rotate_size = 100000000
server_audit_file_rotations = 1000
shell> cat /etc/my.cnf