MIDAS Knowledge Base MIDAS Knowledge Base

Fix "Authentication plugin 'caching_sha2_password' cannot be loaded"

If you encounter a "Authentication plugin 'caching_sha2_password' could not be loaded" error when you install a self-hosted MIDAS room booking system under Perl and MySQL 8, then we have the solution!

This error may also be accompanied by a "cannot open shared object file: No such file or directory" or "the specified module could not be found" message relating to a file named either "caching_sha2_password.so" or "caching_sha2_password.dll".

What causes this error?

MySQL 8 supports a new authentication method based on improved stronger SH256-based password methods. When you install MySQL 8, this is the new default authentication method (although this can be changed during MySQL server installation).

Depending upon your Perl environment, Perl itself (or rather the driver that Perl uses to connect to your MySQL server) may not yet be compatible with the newer authentication method in MySQL 8. When this occurs, an "Authentication plugin 'caching_sha2_password' cannot be loaded" error is produced.

How to fix this error?

To resolve this error, you can revert your MySQL user account back to using "legacy" authentication.

To do this, you'll need to login to your MySQL server and issue the following SQL command:

ALTER USER 'yourusername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';

(where "yourusername" is the MySQL user account you specified your MIDAS system to use, and "yourpassword" is the corresponding MySQL user account password)

Note: You may need to restart your MySQL server for the changes to take affect.


You might also be interested in...


MIDAS » KB » Support » Article 00234

← Return to the Knowledge Base