我有一个高度活跃的服务器,无法重新启动它。很久以前,我已经激活了审计日志,但由于空间问题,我需要关闭它。以下是我的变数;如何在服务器运行时关闭mysql审计日志?
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 |
这里是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
.
.
.
解决方案: 运行UNINSTALL PLUGIN audit_log;
后,它停止记录到AUDIT_LOG文件给我。要验证是否可以使用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
UNINSTALL PLUGIN plugin_name; 请参阅:https://mariadb.com/kb/en/mariadb/uninstall-plugin/ –
卸载插件链接信息听起来不是非常动态和不重新启动 – Drew
我运行此命令,这里是结果。它为我工作。 Nomore日志记录>>>>>> mysql> UNINSTALL PLUGIN audit_log; Query OK,0 rows affected,1 warning(0.00 sec) >>>>>>>> mysql> show warnings; 警告| 1620 |插件正忙,将在关机时卸载 –