Common SQL Errors

MySQL Error 1127 ER_CANT_FIND_DL_ENTRY: Can't find symbol in library - Fix & Prevention Guide

Galaxy Team
August 5, 2025

MySQL cannot find the requested symbol inside a shared library while loading a UDF or 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 1127 (ER_CANT_FIND_DL_ENTRY)?

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.

Error Highlights

Typical Error Message

Can't find symbol '%s' in library

Error Type

Runtime Error

Language

MySQL

Symbol

ER_CANT_FIND_DL_ENTRY

Error Code

1127

SQL State

Explanation

Table of Contents

What is MySQL error 1127 ER_CANT_FIND_DL_ENTRY?

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.

What Causes This Error?

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.

How to Fix MySQL Error 1127 ER_CANT_FIND_DL_ENTRY

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.

Common Scenarios and Solutions

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.

Best Practices to Avoid This Error

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.

Related Errors and Solutions

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.

.

Common Causes

Mismatched Symbol Name

The exported function in the shared library uses a different name or C++ mangled symbol than the one declared in SQL.

Wrong Compilation Flags

The UDF was compiled against a MySQL header from another version, changing the expected symbol prototype.

Incorrect Plugin Directory

The library is searched in plugin_dir, but the .so file resides elsewhere or has insufficient read permissions.

Architecture or ABI Conflict

32-bit libraries loaded into a 64-bit server or libraries built with incompatible C runtime versions prevent symbol resolution.

.

Related Errors

FAQs

Does this error only affect UDFs?

No. Any dynamically loaded component, including authentication or auditing plugins, can trigger 1127 if the symbol name is wrong.

How do I find the correct symbol name?

Compile with mysql_declare_plugin or examine the C source for the function declaration. Then verify with nm or objdump.

Can I fix the error without restarting MySQL?

Yes. After copying the corrected library you only need to DROP and CREATE the UDF or INSTALL PLUGIN again; no restart required.

Does Galaxy prevent this problem?

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.

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