MySql Connection from DO droplet to MySql cluster

Posted October 10, 2021 56 views
MySQLDatabasesDigitalOcean Droplets

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: ERNOTSUPPORTEDAUTHMODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Following this guide: I have changed the plugin to ‘mysqlnativepassword’ using - ALTER USER 'USERNAME’@’%'IDENTIFIED WITH mysqlnativepassword 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

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.

Submit an Answer
1 answer

Hi @lazydip,

I’ll suggest checking the following Documentation :

DigitalOcean Managed Databases using MySQL 8+ are automatically configured to use cachingsha2password authentication by default. cachingsha2password 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 (mysqlnativepassword) if your applications are experiencing authentication issues.