Common SQL Errors

MySQL Error 1702: ER_PLUGIN_IS_PERMANENT - How to Fix and Prevent

Galaxy Team
August 7, 2025

<p>The error appears when you try to unload a plugin that was compiled into MySQL as force_plus_permanent.</p>

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 1702 ER_PLUGIN_IS_PERMANENT?

<p>MySQL Error 1702 ER_PLUGIN_IS_PERMANENT occurs when you try to UNINSTALL a plugin marked force_plus_permanent. This plugin was loaded at compile time and cannot be removed dynamically. Restart the server without the plugin or recompile MySQL to resolve the issue.</p>

Error Highlights

Typical Error Message

Plugin '%s' is force_plus_permanent and can not be

Error Type

Plugin Management Error

Language

MySQL

Symbol

ER_PLUGIN_IS_PERMANENT

Error Code

1702

SQL State

HY000

Explanation

Table of Contents

What is MySQL Error 1702 ER_PLUGIN_IS_PERMANENT?

Error 1702 fires when MySQL rejects an UNINSTALL PLUGIN or INSTALL PLUGIN OFF request because the target plugin was built into the server binary as force_plus_permanent.

The full message is: Plugin '%s' is force_plus_permanent and can not be unloaded. MySQL treats such plugins as core features, so dynamic unloading is blocked for stability and security.

What Causes This Error?

The error surfaces during UNINSTALL PLUGIN, server startup with loose plugin directives, or while disabling a plugin through SQL or configuration files. Because the plugin is compiled as permanent, MySQL safeguards against its removal.

It often appears after upgrading or when administrators attempt to tidy unused plugins without checking their compile-time status.

How to Fix MySQL Error 1702 ER_PLUGIN_IS_PERMANENT

Fixing requires removing the plugin from the server startup path rather than the running instance. You must restart the server without loading the plugin or rebuild MySQL without it.

For packaged binaries, comment out the plugin loading line in my.cnf, then restart MySQL. For source builds, recompile with the plugin disabled, install, and restart.

Common Scenarios and Solutions

If you tried UNINSTALL PLUGIN udf_example and got Error 1702, comment out plugin-load='udf_example.so' in my.cnf and restart.

During Docker image updates, rebuild the image excluding the plugin, then redeploy the container.

Best Practices to Avoid This Error

Audit plugins before running UNINSTALL statements. Check INFORMATION_SCHEMA.PLUGINS for the PLUGIN_LOAD_OPTION column. Avoid force_plus_permanent when compiling custom plugins unless truly essential.

Maintain a version-controlled my.cnf, and test plugin changes in staging servers before production rollout.

Related Errors and Solutions

Error 1125 ER_PLUGIN_IS_NOT_LOADED arises when uninstalling a non-loaded plugin. Validate plugin status first.

Error 1538 ER_CANT_OPEN_LIBRARY occurs when MySQL cannot locate a shared object file. Verify plugin path and permissions.

Common Causes

Compiled as force_plus_permanent

The plugin was built into the server binary with a permanent flag, blocking dynamic unloads.

Startup configuration overrides

my.cnf or command-line options hard-load the plugin at startup, making UNINSTALL ineffective.

Version mismatch after upgrade

Upgrading MySQL can mark formerly optional plugins as permanent, surprising administrators during cleanup.

Related Errors

MySQL Error 1125 ER_PLUGIN_IS_NOT_LOADED

Thrown when attempting to uninstall a plugin that is not currently active.

MySQL Error 1538 ER_CANT_OPEN_LIBRARY

Occurs if MySQL cannot open the shared library for a plugin during install or start.

MySQL Error 1540 ER_CANT_FIND_DL_ENTRY

Appears when the expected entry point symbol is missing from the plugin library.

FAQs

Can I disable a permanent plugin without rebuilding MySQL?

You can only prevent it from loading by editing my.cnf and restarting. Dynamic UNINSTALL will always fail.

Does UNINSTALL PLUGIN ever work on permanent plugins?

No. The force_plus_permanent flag blocks all runtime unload attempts.

How do I know if a plugin is permanent before uninstalling?

Query INFORMATION_SCHEMA.PLUGINS and check that PLUGIN_LOAD_OPTION equals FORCE_PLUS_PERMANENT.

Will Galaxy help me catch this error sooner?

Yes. Galaxy's AI copilot warns when you run UNINSTALL against a permanent plugin and suggests safe removal steps.

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