# About the user filtering of mysql percona audit plugin

**URL:** <https://forums.percona.com/t/about-the-user-filtering-of-mysql-percona-audit-plugin/6791>\
**Category:** Percona Server for MySQL 5.7\
**Created:** [January 14, 2019, 5:50am UTC](https://forums.percona.com/t/about-the-user-filtering-of-mysql-percona-audit-plugin/6791 "2019-01-14T05:50:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spala](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@spala](https://forums.percona.com/u/spala)\
**Post date:** [January 14, 2019, 5:50am UTC](https://forums.percona.com/t/about-the-user-filtering-of-mysql-percona-audit-plugin/6791/1 "2019-01-14T05:50:35Z")

</div>

I have a mysql server. I use Percona and I use the audit log plugin. I have no problem with this.

But there are too many active users in the sub-structure using mysql. I just want to keep the audit logs of real users. I want to use the include and exclude properties for this.

When I apply the following percona article, it fails because it cannot find the mysql variable. Does not add new variable.

Any advice on this?

[URL][Audit Log Plugin — Percona Server 8.0 Documentation](https://www.percona.com/doc/percona-server/LATEST/management/audit_log_plugin.html#filtering-by-user%5B/URL%5D)

I have added the following line to my.cnf file, but again nothing has changed.

audit\_log\_include\_accounts = ‘test @ localhost’

I even wrote to StackOverflow hoping someone would help.  
[url][https://www.percona.com/blog/2015/09/10/percona-server-audit-log-plugin-best-practices/[/url]](https://www.percona.com/blog/2015/09/10/percona-server-audit-log-plugin-best-practices/%5B/url%5D)

[root@mysql-server ~]# cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) [root@mysql-server ~]# yum list installed |grep “percona” Percona-Server-client-57.x86\_64 5.7.22-22.1.el7 @percona Percona-Server-server-57.x86\_64 5.7.11-4.1.el7 @percona Percona-Server-shared-57.x86\_64 5.7.22-22.1.el7 @percona Percona-Server-shared-compat-57.x86\_64 5.7.22-22.1.el7 @percona percona-toolkit.x86\_64 3.0.10-1.el7 @percona [root@mysql-server ~]# mysql -V mysql Ver 14.14 Distrib 5.7.22-22, for Linux (x86\_64) using 6.2  
mysql\> SHOW VARIABLES LIKE ‘audit%’; ±--------------------------±-------------------------+ | Variable\_name | Value | ±--------------------------±-------------------------+ | audit\_log\_buffer\_size | 1048576 | | audit\_log\_file | /var/log/mysql/audit.log | | audit\_log\_flush | OFF | | audit\_log\_format | JSON | | audit\_log\_handler | FILE | | audit\_log\_policy | ALL | | audit\_log\_rotate\_on\_size | 10485760 | | audit\_log\_rotations | 10 | | audit\_log\_strategy | ASYNCHRONOUS | | audit\_log\_syslog\_facility | LOG\_USER | | audit\_log\_syslog\_ident | percona-audit | | audit\_log\_syslog\_priority | LOG\_INFO | ±--------------------------±-------------------------+ 12 rows in set (0.01 sec) mysql\> SET GLOBAL audit\_log\_include\_accounts = ‘test@localhost’; ERROR 1193 (HY000): Unknown system variable ‘audit\_log\_include\_accounts’ mysql\> mysql\> SET GLOBAL audit\_log\_include\_accounts = NULL; ERROR 1193 (HY000): Unknown system variable ‘audit\_log\_include\_accounts’  
[root@mysql-server ~]# cat /etc/my.cnf  
[client] port = 3306 socket = /var/lib/mysql/mysql.sock [isamchk] key\_buffer\_size = 16M [mysqld] audit\_log\_file = /var/log/mysql/audit.log audit\_log\_format = JSON audit\_log\_policy = ALL audit\_log\_rotate\_on\_size = 10M audit\_log\_rotations = 10 basedir = /usr bind-address = 0.0.0.0 binlog-format = ROW datadir = /var/lib/mysql default-storage-engine = innodb expire\_logs\_days = 7 explicit\_defaults\_for\_timestamp = 1 innodb-buffer-pool-size = 1G innodb-file-per-table = 1 innodb-flush-log-at-trx-commit = 2 innodb-flush-method = O\_DIRECT innodb-log-file-size = 512M innodb-log-files-in-group = 2 key\_buffer\_size = 16M log-error = /var/log/mysql/mysqld.log log-queries-not-using-indexes = 0 max-connect-errors = 1000000 max-connections = 1000 max-heap-table-size = 512M max\_allowed\_packet = 16M
