Report this

What is the reason for this report?

Has anyone been able to use managed MySQL?

Posted on September 6, 2019

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.

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?

I’m facing a similar issue with the provided primary user “doadmin” having no super privileges. Not even able to import an existing db because of this

Apparently, “root” is the only user on the cluster with any rights

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:

  • Create a new user with mysql_native_password, then you can use this for your projects as normal:
CREATE USER 'your_user'@'your_server_ip ' IDENTIFIED WITH mysql_native_password BY 'your_password';
  • Or if you would like to keep using the doadmin user, then the query that you need to run would be:
ALTER USER doadmin IDENTIFIED WITH mysql_native_password BY 'your_new_password_here';

If you are still getting any errors feel free to share them here and I’ll be happy to advise you further.

Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.