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


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.

2 Responses to “MySQL Error 1126”

  1. Lapel Pin

    hey, your post truly helps, today i encounter the same problems, and i have no clue on how to solve the issue. luckily i research yahoo and found your post, it helps me get rid of my trouble. thanks once moreone thing, can i paste your entry on my blog? i will add the source and credit to your site.regards!

  2. Silvana

    your post helped me to find a problem wich i have since 2 days ago ! thank you very much !


Leave a Reply

Your email address will not be published. Required fields are marked *