ERROR 1126 (HY000): Can't open shared library
If you receive the error from MySQL while installing a plugin or a user defined function(UDF) there can be several causes:
- You mistyped your dll file name, double check the name
- MySQL can’t find the dll file in the plugin folder
1mysql> show variables like 'plugin_dir';
- And make sure that path matches the path where your dll is stored.
- A dependent dll can’t be found
- Download Dependency Walker
- Open your dll on the machine you’re installing the plugin. It should tell you if there was a missing dependency
In my case it turned out the be #3.
Dependency walker said I was missing MSVCR90D.dll, which I learned from Stack Overflow is actually the debug build of MSVCR90 (Notice: the “D” on the end). So I went back to Visual Studio Express 2008 and made sure my configuration was set to Release and rebuilt the build and copied it over and everything worked.