You can enable compression for any [format] by setting the audit_log_filter_compression system variable when the server starts.
The audit_log_filter_compression variable can be either of the following:
NONE (no compression) - the default value
GZIP - uses the GNU Zip compression
Encryption[¶]
You can encrypt any audit log filter file in any [format] The audit log filter plugin generates the initial password, but you can use user-defined passwords after that. The plugin stores the passwords in the keyring, so that feature must be enabled.
Set the audit_log_filter_encryption system variable with the server starts. The allowed values are the following:
Have you already installed the audit plugin? If not you can do so folllowing the instructions from:
If after installing the audit plugin you still cannot find the above mentioned variables then please provide:
SELECT * FROM information_schema.PLUGINS WHERE PLUGIN_NAME LIKE ‘%audit%’;
SHOW variables LIKE ‘audit%’;
Seems it works on mysql side. Thank you very much!
Installed the Audit Log Filter as below steps:
1.Create a audit database to store the JSON audit table
create database db_audit;
2.install the script: audit_log_filter_linux_install.sql
Find script:
INFRA [mysql@dc02psqldbuat04 share]# pwd
/data/percona8.0.36/share
INFRA [mysql@dc02psqldbuat04 share]# ls -l | grep audit_log_filter_linux_install.sql
-rw------- 1 mysql mysql 2316 Dec 21 15:35 audit_log_filter_linux_install.sql
Run script:
/data/percona8.0.35/bin/mysql --login-path=rootjasonDB -D db_audit < /data/percona8.0.36/share/audit_log_filter_linux_install.sql
3.Verify plugin related to audit filter:
root@localhost:mysql_jasonDB.sock [(none)]> SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE ‘audit%’;
±-----------------±--------------+
| PLUGIN_NAME | PLUGIN_STATUS |
±-----------------±--------------+
| audit_log | ACTIVE |
| audit_log_filter | ACTIVE |
±-----------------±--------------+
2 rows in set (0.00 sec)
4.Verify vaiables related to audit filter:
root@localhost:mysql_jasonDB.sock [(none)]> select @@audit_log_filter_compression;
±-------------------------------+
| @@audit_log_filter_compression |
±-------------------------------+
| NONE |
±-------------------------------+
1 row in set (0.00 sec)
root@localhost:mysql_jasonDB.sock [(none)]> select @@audit_log_filter_encryption;
±------------------------------+
| @@audit_log_filter_encryption |
±------------------------------+
| AES |
±------------------------------+
1 row in set (0.00 sec)