# audit\_log\_format=JSON not being applied even after adding to my.cnf and restarting mysql server

**URL:** <https://forums.percona.com/t/audit-log-format-json-not-being-applied-even-after-adding-to-my-cnf-and-restarting-mysql-server/17241>\
**Category:** Percona Server for MySQL 8.0\
**Created:** [August 31, 2022, 11:21pm UTC](https://forums.percona.com/t/audit-log-format-json-not-being-applied-even-after-adding-to-my-cnf-and-restarting-mysql-server/17241 "2022-08-31T23:21:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ipcmlr](https://avatars.discourse-cdn.com/v4/letter/i/df705f/32.png) [@ipcmlr](https://forums.percona.com/u/ipcmlr)\
**Post date:** [August 31, 2022, 11:21pm UTC](https://forums.percona.com/t/audit-log-format-json-not-being-applied-even-after-adding-to-my-cnf-and-restarting-mysql-server/17241/1 "2022-08-31T23:21:29Z")

</div>

Hi Everyone,  
Must be something simple I’m missing here.  
My audit log is in the old xml format. It is working and my server is using the percona audit plugin.  
I put a line in the my.cnf file (I’m 100% sure that it’s the file being used)  
audit\_log\_format = JSON  
It doesnt give an error when I restart but it doesnt apply the json format to the log file.  
Doing a show variables shows that the old format is still being used. what am I missing here?

root@localhost (none)\> show variables like ‘audit%’;  
±----------------------------±--------------+  
| Variable\_name | Value |  
±----------------------------±--------------+  
| audit\_log\_buffer\_size | 1048576 |  
| audit\_log\_exclude\_accounts | |  
| audit\_log\_exclude\_commands | |  
| audit\_log\_exclude\_databases | |  
| audit\_log\_file | audit.log |  
| audit\_log\_flush | OFF |  
| audit\_log\_format | OLD |  
| audit\_log\_handler | FILE |  
| audit\_log\_include\_accounts | |  
| audit\_log\_include\_commands | |  
| audit\_log\_include\_databases | |  
| audit\_log\_policy | ALL |  
| audit\_log\_rotate\_on\_size | 0 |  
| audit\_log\_rotations | 0 |  
| audit\_log\_strategy | ASYNCHRONOUS |  
| audit\_log\_syslog\_facility | LOG\_USER |  
| audit\_log\_syslog\_ident | percona-audit |  
| audit\_log\_syslog\_priority | LOG\_INFO |  
±----------------------------±--------------+

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [September 1, 2022, 3:46pm UTC](https://forums.percona.com/t/audit-log-format-json-not-being-applied-even-after-adding-to-my-cnf-and-restarting-mysql-server/17241/2 "2022-09-01T15:46:58Z")

</div>

Looks like you might need to unload and re-load the plugin? This blog post indicates that you add the parameters to my.cnf then load the plugin.

> **[Percona Server audit log plugin best practices](https://www.percona.com/blog/2015/09/10/percona-server-audit-log-plugin-best-practices/)**
>
> Andrew Moore shares best practices when auditing your database, tracking access & changes to your data & db objects with Percona Server's audit log plugin.
