The server cannot load a required Windows system library, blocking startup or plugin initialization.
MySQL Error 42: EE_WIN_LIBRARY_LOAD_FAILED means the Windows DLL kernel32.dll (or another specified library) did not load, so MySQL cannot start or load a component. Re-install the missing DLL and ensure the MySQL service account has read access to resolve the issue.
LoadLibrary("kernel32.dll") failed: GetLastError returns %lu. EE_WIN_LIBRARY_LOAD_FAILED was added in 8.0.13.
MySQL throws EE_WIN_LIBRARY_LOAD_FAILED when it calls the Windows API LoadLibrary function and the operating system returns an error. The message shows the DLL name and the GetLastError value, making it clear which library failed to load.
The error appears during server startup, plugin loading, UDF registration, or any operation that dynamically links a Windows DLL.
From MySQL 8.0.13 onward, the condition name EE_WIN_LIBRARY_LOAD_FAILED maps to internal error code 42.
The server halts initialization when a required DLL is absent, corrupted, or inaccessible. Until resolved, no client can connect, and dependent applications remain offline. On production systems this leads to downtime, data unavailability, and potential revenue loss.
Missing or corrupted Windows DLL files are the primary trigger. MySQL relies on system libraries such as kernel32.dll, advapi32.dll, or custom plugin DLLs.
If the file is deleted, renamed, or damaged, LoadLibrary fails.
Incorrect Windows permissions also cause the error. If the MySQL service account lacks read or execute rights on the DLL or its folder, the operating system blocks loading and returns an error code like 126 or 5.
Architecture mismatches between MySQL binaries and DLLs create another failure vector.
Loading a 32-bit DLL into a 64-bit server process, or vice versa, results in error 193 and triggers EE_WIN_LIBRARY_LOAD_FAILED.
Identify the missing DLL by reading the full error message in the MySQL error log. Replace or restore the file from a trusted Windows installation media or from the original plugin provider.
Verify NTFS permissions.
Grant Read and Execute rights on the DLL file and its parent folders to the account that runs mysqld (typically NETWORK SERVICE or a dedicated user).
Check architecture compatibility. Confirm that both MySQL and the DLL are built for the same CPU architecture. Re-install the correct 64-bit or 32-bit variant as needed.
Galaxy surfaces MySQL startup errors directly in its diagnostic panel, allowing developers to see EE_WIN_LIBRARY_LOAD_FAILED instantly.
By storing server configuration files in Galaxy’s versioned collections, teams track plugin paths and spot accidental changes that might point to missing DLLs.
Galaxy’s collaborative workflow also lets administrators share the exact SQL and PowerShell commands used to repair permissions, ensuring repeatable fixes across environments.
Keep consistent directory structures across dev, staging, and production so DLL paths remain valid after deployment.
Automate Windows permission settings with scripts checked into version control.
Monitor the MySQL error log with tools like Windows Event Forwarding or Galaxy’s log streaming integration. Early alerts help you correct missing libraries before users notice downtime.
During upgrades, verify that third-party plugins have new builds compatible with the target MySQL version and system architecture.
Error 126 The specified module could not be found - occurs at the OS layer and surfaces inside EE_WIN_LIBRARY_LOAD_FAILED.
Fix by restoring the DLL.
Error 193 %1 is not a valid Win32 application - indicates a 32-bit/64-bit mismatch. Use matching binaries to resolve.
Error 5 Access is denied - points to file permission issues. Grant Read and Execute rights to the MySQL service account.
.
The referenced DLL is not present in any directory listed in the system PATH or in the MySQL bin folder.
System updates or malware may damage kernel32.dll or another core library, preventing successful loading.
The service account running mysqld lacks NTFS permissions to read or execute the DLL file.
Trying to load a 32-bit DLL into a 64-bit MySQL instance (or vice versa) returns OS error 193.
my.ini or INSTALL PLUGIN statements point to an incorrect or outdated DLL path.
.
Direct Windows message that often surfaces inside EE_WIN_LIBRARY_LOAD_FAILED. Fix by restoring the DLL.
Raised when trying to load a DLL of the wrong architecture. Use matching 32-bit or 64-bit binaries.
Occurs when a user defined function's DLL is missing.
Solution pattern mirrors EE_WIN_LIBRARY_LOAD_FAILED.
Generic shared library loading error on Unix systems, similar root causes but different platform.
.
No. The error lists whatever DLL failed. kernel32.dll appears when core Windows files are missing or corrupted, but plugins can trigger the same condition.
Reinstalling may restore missing DLLs, but if a third-party plugin is at fault you must reinstall or update that plugin separately.
Open Services.msc, find MySQL, and view the Log On As column. That account needs read and execute rights on the DLL.
Yes. Galaxy streams MySQL logs and highlights EE_WIN_LIBRARY_LOAD_FAILED, enabling faster root cause analysis by your team.