By lazydip
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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @lazydip,
I’ll suggest checking the following Documentation :
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.