<pre class="">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:

  1. You mistyped your dll file name, double check the name
  2. MySQL can’t find the dll file in the plugin folder
    1. Run: ```
      mysql> show variables like 'plugin_dir';
       ```
      
    2. And make sure that path matches the path where your dll is stored.
  3. A dependent dll can’t be found
    1. Download Dependency Walker
    2. 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.

dependencywalkerrorDependency 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.