I want to connect LDAP to my MariaDB instance on my Ubuntu server so that I can create user accounts by linking them like this:

CREATE USER 'testuser'@'%'
  IDENTIFIED WITH authentication_ldap_simple
  AS 'uid=testuser,ou=testing,dc=test,dc=com'; 

But for that I need to install the plugin authentication_ldap_simple. I tried installing it with this command but it failed:

INSTALL PLUGIN authentication_ldap_simple SONAME 'authentication_ldap_simple.so';
ERROR 1126 (HY000): Can't open shared library '/usr/lib/mysql/plugin/authentication_ldap_simple.so' (errno: 2, cannot open shared object file: No such file or directory)

I tried to find a way to install the plugin via apt but I couldn't find any. Can you help me? How do I install authentication_ldap_simple or get the file authentication_ldap_simple.so? Or is there another way to authenticate with LDAP?


2 Answers 2


The error indicates errno: 2, cannot open shared object file: No such file or directory. I believe your .so is either broken/corrupt or is fetching from incorrect path. The plugin should be present in /usr/lib/mysql/plugin/. Validate if MySQL is trying to install the plugin from above path.

  • Thanks for your answer! Yes, mariadb is trying to install it from /usr/lib/mysql/plugin/ but the file isn't existing. I've searched the whole system using find and it doesn't exist. Do you know how I can get the file?
    – ojn06031
    Apr 11, 2022 at 8:07
  • If you have another set up, just copy the .so file.
    – Dexter
    Apr 11, 2022 at 8:28
  • Unfortunately I don't have another setup. Do you know from where I could download the .so file by any chance?
    – ojn06031
    Apr 11, 2022 at 8:37

'authentication_ldap_simple' is library in Mysql enterprise edition

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.