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