Do you know when your SSL certificate expires? Find out now

Fixing "Authentication plugin 'caching_sha2_password' cannot be loaded" errors


You have installed MySQL 8 and are unable to connect your database using your MySQL client (Sequel Pro, HeidiSQL etc). Every attempt to connect using your MySQL client results in the following error

Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/, 2): image not found


As of MySQL 8.0, caching_sha2_password is now the default authentication plugin rather than mysql_native_password which was the default in previous versions. This means that clients (Sequel Pro, HeidiSQL etc) that rely on the mysql_native_password won't be able to connect because of this change.


1) You can, at a server level, revert to the mysql_native_password mechanism by adding the following to your MySQL configuration files


2) You can, at a user level, revert to the mysql_native_password mechanism via the following process

Open a terminal window and connect to your MySQL instance via the command line

mysql -u [USERNAME] -p

Enter your MySQL password and press enter and you should be logged into your MySQL instance.

Now run the following SQL command, replacing [USERNAME], [PASSWORD] and [HOST] as appropriate.

Note: [HOST] can be the IP address of your computer which would allow access from your computer only or, in the case of a local development environment, you can use % to allow from any host.

  IDENTIFIED WITH mysql_native_password \


  IDENTIFIED WITH mysql_native_password \

Now you should be able to go back to your MySQL client and connect as normal.


The Author

Ready for more?

Subscribe to our newsletter and get hints and tips for keeping your site performing at its best direct to your inbox