1

I do have a highly active server and can't restart it. Long back I have activated the audit log but due to space issue I need to turn it off. Below are my variables;

audit_log_buffer_size       | 1048576      |
audit_log_connection_policy | ALL          |
audit_log_current_session   | ON           |
audit_log_exclude_accounts  |              |
audit_log_file              | audit.log    |
audit_log_flush             | OFF          |
audit_log_format            | OLD          |
audit_log_include_accounts  |              |
audit_log_policy            | ALL          |
audit_log_rotate_on_size    | 0            |
audit_log_statement_policy  | ALL          |
audit_log_strategy          | ASYNCHRONOUS |

And here is my.cnf

plugin-load=audit_log.so
.
.
.
# Audit Log - 
#--------------------------
#audit-log=FORCE_PLUS_PERMANENT
#audit_log_exclude_accounts=.....
#audit_log_file= /var/log/mysql/mysql_audit_db1.log
.
.
.

Solution: After running UNINSTALL PLUGIN audit_log; it stopped logging to audit_log file for me. To verify that you can use SHOW PLUGINS;

mysql> UNINSTALL PLUGIN audit_log; 
Query OK, 0 rows affected, 1 warning (0.00 sec) 
mysql> show warnings; 
Warning | 1620 | Plugin is busy and will be uninstalled on shutdown enter code here
Kourosh Samia
  • 127
  • 3
  • 10
  • UNINSTALL PLUGIN plugin_name; see: https://mariadb.com/kb/en/mariadb/uninstall-plugin/ – Bernd Buffen Aug 26 '15 at 18:47
  • that uninstall plugin link info doesn't sound very dynamic and non-restart – Drew Aug 26 '15 at 18:50
  • I ran this command and here is the result. It worked for me. Nomore logging >>>>>>mysql> UNINSTALL PLUGIN audit_log; Query OK, 0 rows affected, 1 warning (0.00 sec) >>>>>>>>mysql> show warnings; Warning | 1620 | Plugin is busy and will be uninstalled on shutdown – Kourosh Samia Aug 26 '15 at 19:49

1 Answers1

1

As FORCE_PLUS_PERMANENT looks commented out, you might use the UNINSTALL PLUGIN command, as written here:

https://dev.mysql.com/doc/refman/5.5/en/server-plugin-loading.html#server-plugin-uninstalling

If the FORCE_PLUS_PERMANENT is active, you're out of luck, as this is to protect the audit log from on-the-fly disabling.

PetrosHu
  • 303
  • 2
  • 9
  • Looks like it is installed. audit_log | ACTIVE | AUDIT | audit_log.so | PROPRIETARY | – Kourosh Samia Aug 26 '15 at 19:31
  • Then you can try to uninstall it with the uninstall plugin command. If it does not help, you will have to shut the mysql server down for a moment. – PetrosHu Aug 27 '15 at 07:56