I tried to use Digital Ocean’s new managed MySQL but users I create use caching_sha2_password authentication which the Node mysql client doesn’t support. DigitalOcean support told me to run
ALTER USER myuser IDENTIFIED WITH mysql_native_password BY 'mypassword';
but I got a permissions error, apparently I don’t have permission to run that on their MySQL cluster.
So, is their new managed MySQL offering 100% useless for anyone wanting to use it with Node?
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!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Hello,
I am already using the managed MySQL services for a few of my projects.
I’ve also tested your query and I can confirm that it is working as normal and also I can confirm that the doadmin database user has privileges to run this on your MySQL cluster.
There are two things that you might want to consider:
mysql_native_password
, then you can use this for your projects as normal:doadmin
user, then the query that you need to run would be:If you are still getting any errors feel free to share them here and I’ll be happy to advise you further.
Regards, Bobby
I’m also having the same issue. One of the issues I’m experiencing is the requirement to specify the ssl-mode in the connection string. To be able to connect at all to the DO managed MySQL service, I have to specify ssl-mode=DISABLED.
I’ve downloaded the Cert and applied manually to my pod, but I’m still getting the caching_sha2_password error after trying the ALTER USER query.
Tongas, you might try to see if you can add the ssl-mode=DISABLED or enable SSL from your app to the managed MySQL instance?
Here’s the error I continue to get after creating a new user with
CREATE USER 'your_user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password';
and assigning privileges: