MySQL cannot find the requested symbol inside a shared library while loading a UDF or plugin.
MySQL Error 1127: ER_CANT_FIND_DL_ENTRY occurs when the server fails to locate the symbol declared in CREATE FUNCTION or INSTALL PLUGIN inside the specified shared library. Recompile the library with the correct symbol name, copy it to the plugin directory, and recreate the function or plugin to resolve the issue.
Can't find symbol '%s' in library
Error 1127 fires when MySQL loads a user defined function (UDF) or plugin and cannot locate the symbol name you declared in CREATE FUNCTION or INSTALL PLUGIN inside the linked shared object.
Because the symbol is missing or mis-named, the dynamic loader rejects the library and MySQL aborts the operation, returning SQLSTATE HY000.
A mismatch between the symbol exported by the compiled library and the symbol specified in SQL is the primary trigger.
ABI or architecture mismatches, incorrect plugin_dir paths, and file permission issues also raise the error.
Older MySQL versions compiled with different GCC flags may refuse newer libraries, while 32-bit versus 64-bit builds result in missing symbol lookups.
First, verify the symbol actually exists by running nm or objdump on the .so file.
Recompile the C/C++ source using mysql_create_function or mysql_declare_plugin macros to expose the correct name, then copy the library into the plugin directory owned by the MySQL user.
Finally, drop and recreate the function or plugin so that MySQL performs a fresh lookup against the corrected binary.
During migration to a new server the compiled UDF may target an outdated GLIBC.
Recompile on the target machine to align libraries.
If the library loads on Linux but fails on macOS, confirm the use of .dylib versus .so and adjust the SONAME accordingly.
Adopt CI pipelines that rebuild UDFs against each new MySQL release, keep plugin_dir under version control, and run automated nm checks that compare exported symbols with CREATE FUNCTION metadata.
Use Galaxy's AI copilot to generate or review CREATE FUNCTION statements and store them in a shared Collection so the team always references the correct symbol name.
ER_CANT_OPEN_LIBRARY (1126) appears when the library file itself is missing or unreadable.
Ensure file path and permissions.
ER_FUNCTION_NOT_DEFINED (1128) indicates the function exists in SQL but cannot execute, often following 1127 when the symbol later becomes unavailable.
.
The exported function in the shared library uses a different name or C++ mangled symbol than the one declared in SQL.
The UDF was compiled against a MySQL header from another version, changing the expected symbol prototype.
The library is searched in plugin_dir, but the .so file resides elsewhere or has insufficient read permissions.
32-bit libraries loaded into a 64-bit server or libraries built with incompatible C runtime versions prevent symbol resolution.
.
No. Any dynamically loaded component, including authentication or auditing plugins, can trigger 1127 if the symbol name is wrong.
Compile with mysql_declare_plugin or examine the C source for the function declaration. Then verify with nm or objdump.
Yes. After copying the corrected library you only need to DROP and CREATE the UDF or INSTALL PLUGIN again; no restart required.
Galaxy surfaces server errors instantly in its editor output, helping you detect 1127 early. Collections let teams store the exact CREATE FUNCTION statement so symbol mismatches are less likely.