Common SQL Errors

MySQL Error 3216: ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED - audit_log plugin not installed

Galaxy Team
August 8, 2025

The server throws this error when the audit_log plugin is referenced but has not been installed with INSTALL PLUGIN.

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 3216 (ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED)?

ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED appears when MySQL cannot find the audit_log plugin. Install or enable the plugin with INSTALL PLUGIN audit_log SONAME 'audit_log.so'; then restart or reload the plugin to clear the error.

Error Highlights

Typical Error Message

ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED

Error Type

Plugin Installation Error

Language

MySQL

Symbol

PLUGIN syntax. ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED was added in 5.7.22.

Error Code

3216

SQL State

HY000

Explanation

Table of Contents

What does ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED mean?

MySQL raises error 3216 when a statement or configuration setting tries to use the audit_log plugin but the server cannot locate the plugin binary in the plugin directory.

The error surfaced starting with MySQL 5.7.22 and continues in 8.x when audit_log is referenced without prior installation.

When does this error occur?

The message typically appears at startup if audit_log is listed in the my.cnf file, or after a dynamic SET GLOBAL command enables audit_log without installing it first.

It can also occur during an INSTALL COMPONENT command that references audit_log incorrectly.

Why is fixing it important?

Leaving the plugin uninstalled can break compliance monitoring, generate noisy logs, and block startup when audit_log is marked as mandatory in configuration.

Proper installation restores auditing and prevents service interruptions.

What Causes This Error?

Omitting the INSTALL PLUGIN statement before enabling audit_log is the main trigger.

Moving or deleting the audit_log.so file from the plugin directory causes MySQL to think the plugin is missing.

Incorrect plugin_dir paths or file permissions stop MySQL from loading the shared library.

How to Fix ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED

Install the plugin with INSTALL PLUGIN or mysql_plugin, then verify it is active in performance_schema.

Ensure the audit_log shared object resides in the plugin_dir and the mysqld process can read it.

Common Scenarios and Solutions

Cloud migrations often skip custom plugins; reinstall audit_log after restore.

Package upgrades may overwrite plugin binary paths; confirm the file exists and permissions remain intact.

Best Practices to Avoid This Error

Automate plugin installation in deployment scripts so new servers always run INSTALL PLUGIN before configuration enables audit_log.

Monitor SHOW PLUGINS results at startup with tools like Galaxy to detect missing plugins quickly.

Related Errors and Solutions

ER_PLUGIN_IS_NOT_LOADED indicates an installed plugin failed to load; reinstall or fix library path.

ER_CANT_OPEN_LIBRARY shows MySQL cannot open the shared object file due to permissions or missing dependencies.

Common Causes

Omitted INSTALL PLUGIN

Administrators enabled audit_log in my.cnf but never ran INSTALL PLUGIN audit_log.

Plugin Binary Missing

The audit_log.so file was deleted or moved during an upgrade or filesystem cleanup.

Incorrect plugin_dir

The plugin_dir parameter points to a directory that does not contain audit_log.so.

File Permission Issues

mysqld lacks read or execute permission on the plugin file.

Related Errors

ER_PLUGIN_IS_NOT_LOADED (1126)

Plugin was installed but failed to load at runtime.

ER_CANT_OPEN_LIBRARY (1127)

MySQL cannot open the shared object due to path or permission issues.

ER_PLUGIN_LOAD_ERR (1124)

An error occurred during plugin loading, often signaling missing dependencies.

FAQs

How do I know if audit_log is already installed?

Run SELECT PLUGIN_NAME, PLUGIN_STATUS FROM information_schema.PLUGINS WHERE PLUGIN_NAME='audit_log';. If you see ACTIVE, it is installed.

Can I install audit_log at runtime?

Yes. Use INSTALL PLUGIN audit_log SONAME 'audit_log.so'; then SET GLOBAL audit_log_policy=ALL; to start auditing.

Does Galaxy help detect missing plugins?

Galaxy surfaces plugin status in its schema explorer and highlights errors returned by SHOW PLUGINS, making it easy to spot missing audit_log installations.

Is the error safe to ignore?

No. Ignoring it disables auditing and may violate compliance requirements. Always resolve the plugin installation.

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