Upgrade all On-demand MySQL Service Instances
". Like a single-node service instance, this will cause downtime.bosh -d <deployment name> ssh <instance name>
admin$ mysql --defaults-file=/var/vcap/jobs/mysql/config/mylogin.cnf
mysql> INSTALL PLUGIN audit_log SONAME 'audit_log.so';
SHOW PLUGINS;
+--------------------------------+----------+--------------------+--------------+---------+ | Name | Status | Type | Library | License | +--------------------------------+----------+--------------------+--------------+---------+ ... | audit_log | ACTIVE | AUDIT | audit_log.so | GPL | +--------------------------------+----------+--------------------+--------------+---------+
5. By default, the audit log doesn't have any rotation rules. We need to manually set it.
The best practice from the Percona website is the following:
## Audit Logging ## audit_log_policy=ALL audit_log_format=JSON audit_log_file=/var/log/mysql/audit.log audit_log_rotate_on_size=1024M audit_log_rotations=10
mysql> set global audit_log_rotations=10;
1024
MB needs to be converted to 1073741824
.