MySQL has a PAM authentication plugin that will let you use any available PAM module to provide authentication services. There is a pam_ldap
module that is relatively easy to configure that should allow you to do what you want.
The plugin documentation includes an example using LDAP.