This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-17. For the latest, interactive version please visit https://mariadb.com/kb/.

Audit parameters getting reset after MySQL DB restart

Hi

I am working on automating the installation and configuration of MySQL for faster deployment. As part of this, I enable the Audit parameters dynamically which works fine. However after the instance restart, I noticed that the parameters are getting reset to their factory defaults which disables auditing. For instance, server_audit_logging gets reset to OFF.

Has anyone come across this? How do I persist my settings across instance restarts?

Thanks

Answer Answered by Sanjay Kumar Raghavendra in this comment.

Thanks. I actually figured it out. Here is the problem. If the server_audit_file_path variable points to a non-existent directory, then the server_audit_logging will not get enabled even if you set it in my.cnf. I was using Unix variables for the server_audit_file_path which apparently wer not getting expanded. Like this

server_audit_file_path=$DIRECTORY_AUD/audit.log

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.