Report this

What is the reason for this report?

Locked out of my database

Posted on August 26, 2025

Back in May 2025, my website hosted through DigitalOcean stopped working with the message “Error establishing a database connection.” I tried many times, through DigitalOcean’s support, and can’t even access it through the recovery console. Tried getting another hosting service to help me gain access to transfer my database via SSH and they got “Permission denied, please try again.” error. DigitalOcean just sends me endless instructions that get me nowhere. Can anyone tell me how to access my database? This is probably such a basic question but I am not a programmer.



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.

Hi Maria,

When you use a self-managed Droplet on DigitalOcean, you are the administrator of that server. That means DigitalOcean’s support team can’t log in or access the server or your database on your behalf, they can only provide general guidance and documentation.

From what you describe, it sounds like you’ve lost access to the server (either due to missing SSH keys or forgotten passwords). Without SSH access, you won’t be able to connect to the database or export the data.

DigitalOcean has a guide that explains the recovery options if you’ve lost your SSH key or can’t log in: https://docs.digitalocean.com/support/i-lost-the-ssh-key-for-my-droplet/

Once you have SSH access you should be able to either move over your website or fix the database error.

Usually the database error might be just a matter of restarting the MySQL service on the server or updating your password accordingly, but that is all done via SSH on the server itself.

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.