How to configure WordPress with a Managed Database

Posted August 22, 2019 7.2k views
UbuntuMySQLConfiguration Management

Hey all!

I want to test out the new DigitalOcean Managed MySQL databases, can you tell me what do I have to do in order to configure my WordPress to connect to my Managed MySQL database?

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


I would recommend following this great step by step guide by Mark Drake on how to setup your WordPress with a Managed Database:

Hope that this helps!

  • Bobby, There is a key issue with this step-by-step guide, and an issue with Managed Databases as well.

    The default authentication plugin is set to cachingsha2password. This is not currently supported in PHP, see:

    The recommended workaround is to change the MySQL server settings, changing the default authentication plugin. However, Managed Databases does not expose this.

    How on earth are we meant to use this with WordPress & PHP in general?

    • Hello,

      Indeed this is correct for the default user that comes with your managed database. But you could change that with:

      ALTER USER myuser IDENTIFIED WITH mysql_native_password BY 'mypassword';

      Or of course you could create another user and set the password to mysql_native_password:

      CREATE USER 'wordpressuser'@your_server_ip IDENTIFIED WITH mysql_native_password BY 'password';

      If you take a closer look at the article you will see that this is explicitly specified there.

      Hope that this helps!

      • Hello, there is another issue with this tutorial. Creating another user and setting the password to mysqlnativepassword works indeed, also GRANT ALL PRIVILEGES on wordpress database to that user also works - what didn’t work for me, following this tutorial up to that point was to FLUSH PRIVILEGES; when I try to do that I get this error:

        ERROR 1227 (42000): Access denied; you need (at least one of) the RELOAD privilege(s) for this operation

        How to solve this? Shouldn’t the doadmin user have this permission by default?

        Please advise.



        • Hello,

          Unless you are using INSERT on the main user tables, the privileges should automatically reload, which would prevent the need to flush.

          Hope that this helps!