Question

MySql Connection from DO droplet to MySql cluster

I’m running node.js application from DO droplet the app is running fine, however, it does not connect to MySql DB on DO cluster. The connection works fine from my local machine to the cluster (I’m using the same credentials for the db connection), Workbench connecting without a problem too. Here is the error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Following this guide: https://docs.digitalocean.com/products/databases/mysql/resources/troubleshoot-connections/ I have changed the plugin to ‘mysql_native_password’ using - ALTER USER ‘USERNAME’@'%'IDENTIFIED WITH mysql_native_password BY ‘PASSWORD’. The user has all the privileges. That helped to connect to the DB from the app that is running on my local machine. Nothing changed for the app that is running on the droplet it still does not communicate with the DB on the Cluster. Please help Thank You

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @lazydip,

I’ll suggest checking the following Documentation :

https://docs.digitalocean.com/products/databases/mysql/how-to/manage-users-and-databases/#password-encryption

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 some applications (such as PHP based applications using PHP 7.1 or older) have trouble connecting to MySQL 8+ databases. You can use the Password Encryption option to set a user’s password encryption to the legacy version (mysql_native_password) if your applications are experiencing authentication issues.

Regards, KFSys