Common SQL Errors

MySQL Error 3210 ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED - How to Fix and Prevent

Galaxy Team
August 8, 2025

The server was asked to apply JSON audit log filtering but the required audit_log_filter plugin is not installed or enabled.

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 3210 ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED?

ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED occurs when MySQL tries to use JSON audit log filters but the audit_log_filter plugin is missing. Install and enable the plugin, then activate JSON filtering to fix the error.

Error Highlights

Typical Error Message

ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED

Error Type

Configuration Error

Language

MySQL

Symbol

ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED was added in 5.7.22.

Error Code

3210

SQL State

HY000

Explanation

Table of Contents

What is ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED?

MySQL throws ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED when the server receives a command that relies on JSON audit log filters, yet the audit_log_filter plugin has not been loaded. The message signals that filtering rules cannot be applied until the plugin is present.

When does the error appear?

The error is common after upgrading to MySQL 5.7.22+ or 8.x and enabling audit log filtering options such as audit_log_filter_id without first installing the plugin. It can surface at startup, during SET GLOBAL statements, or while calling audit_log_filter_set.

Why is it important to fix?

Without JSON filtering, audit logs may store excessive or sensitive data, increasing disk usage and compliance risk. Resolving the error restores fine-grained logging control and keeps security teams compliant.

What Causes This Error?

The root cause is the absence or deactivation of the audit_log_filter plugin. MySQL core does not ship it as built-in; administrators must explicitly install it.

How to Fix ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED

Install the plugin with INSTALL PLUGIN audit_log_filter SONAME 'audit_log_filter.so'; then verify it with SELECT * FROM information_schema.plugins WHERE plugin_name='audit_log_filter';. Finally, enable JSON filtering variables.

Common Scenarios and Solutions

If the plugin file is missing from the plugin directory, copy audit_log_filter.so from the MySQL distribution. On Windows, use audit_log_filter.dll in the bin directory and run INSTALL PLUGIN accordingly.

Best Practices to Avoid This Error

Automate plugin installation in deployment scripts, confirm plugin status at startup, and use GALAXY's SQL snippets library to store the correct INSTALL statements for reuse.

Related Errors and Solutions

ER_AUDIT_LOG_UDF_NOT_PRESENT appears when the audit_log_user variable is set but the user-defined functions are absent. Fix by installing audit_log_user.so. ER_AUDIT_PLUGIN_CANNOT_LOAD means the audit plugin file is unreadable; grant correct file permissions.

Common Causes

Missing Plugin File

The audit_log_filter shared library is not present in the plugin directory, often after package-based upgrades.

Plugin Not Loaded at Startup

my.cnf lacks plugin-load directives, so the server boots without the filter plugin.

Manual Uninstall

Administrators removed the plugin with UNINSTALL PLUGIN but did not disable filtering options.

Incorrect File Permissions

MySQL lacks read permissions on audit_log_filter.so, causing load failure and the error on first filter use.

Related Errors

ER_AUDIT_LOG_FILTER_NOT_FOUND

Raised when a referenced filter ID does not exist in mysql.audit_log_filter table.

ER_AUDIT_PLUGIN_CANNOT_LOAD

Indicates MySQL failed to load the audit plugin due to missing file or bad permissions.

ER_AUDIT_LOG_JSON_TOO_LONG

Occurs when the generated JSON event exceeds the maximum size limit.

FAQs

Do I need the filter plugin on every replica?

Yes. Each MySQL instance that uses JSON filtering must have the audit_log_filter plugin installed to avoid the error.

Will enabling the plugin affect performance?

The overhead is minimal. Filtering may actually reduce I/O by writing fewer events.

Can I load the plugin at runtime?

Yes. INSTALL PLUGIN works on a running server and does not require restart, but updating my.cnf ensures persistence.

How does Galaxy help?

Galaxy allows you to store and share the INSTALL PLUGIN script, making it easy for teams to reproduce the correct configuration during deployments.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo