# How do I fix the authentication error when connecting to MySQL? ``` ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client ``` ``` Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory ``` Authentication errors occur when you attempt to connect to MySQL using an application like MySQL Workbench or a version 5.x client that does not support the `caching_sha2_password`. If you are getting one of these errors using a PHP-based application to connect to the database, the following solution only works for applications using PHP 7.2 or higher. Set the user’s password encryption settings to MySQL 5.x encryption settings, using the [**Password Encryption** option](https://docs.digitalocean.com/products/databases/mysql/how-to/manage-users-and-databases/index.html.md#password-encryption) in the control panel. Otherwise, you can use the following solution to connect to MySQL with a 5.x client or an application that does not support `caching_sha2_password`. Connect using MySQL 8.x and issue the following statement, which changes the password type the server will accept for the current user. Replace `use_your_user` with your MySQL username, and replace `use_your_password` with the user’s current password: ```mysql ALTER USER use_your_user IDENTIFIED WITH mysql_native_password BY 'your_password'; ``` **Note**: DigitalOcean Managed Databases using MySQL 8+ are automatically configured to use `caching_sha2_password` authentication by default. `caching_sha2_password` uses a stronger password encryption than prior versions of MySQL and PHP based applications using PHP 7.1 or older do not support MySQL 8+ password encryption. ## Related Topics [How do I fix the mysqldump "Couldn't execute FLUSH TABLES Access denied" error?](https://docs.digitalocean.com/support/how-do-i-fix-the-mysqldump-couldnt-execute-flush-tables-access-denied-error/index.html.md): Update backup user permissions, remove the –single-transaction flag, or downgrade mysqldump. [Why does MySQL shut down when importing data with the source command?](https://docs.digitalocean.com/support/why-does-mysql-shut-down-when-importing-data-with-the-source-command/index.html.md): Use MySQL’s import command instead of source for handling large data imports. [How do I fix the "1227" error?](https://docs.digitalocean.com/support/how-do-i-fix-the-1227-error/index.html.md): Remove or replace the DEFINER in the dump file.