3392
MySQLERRORNotableAccess ControlHIGH confidence

Dynamic privilege not registered

Production Risk

Low — GRANT fails; no privilege change occurs.

How to reproduce
trigger — this will error
trigger — this will error
GRANT MY_PLUGIN_PRIV ON *.* TO 'user'@'localhost';

expected output

ERROR 3392 (HY000): Dynamic privilege 'MY_PLUGIN_PRIV' is not registered.

Fix

Install the plugin that registers the privilege

Install the plugin that registers the privilege
INSTALL COMPONENT 'file://component_my_plugin'; GRANT MY_PLUGIN_PRIV ON *.* TO 'user'@'localhost';

Why this works

The component registers its dynamic privileges on installation, making them available for GRANT.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3392 ER_DYNAMIC_PRIVILEGE_NOT_REGISTERED

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors