Report this

What is the reason for this report?

Why can't I connect to my managed postgres db cluster?

Posted on November 8, 2020

This is my connection parameter, everything is copied straight from the cluster address details into my OS environment variables.

host = {
    "host" : os.environ.get('DO_HOST'),
    "database" : os.environ.get('DO_DB'),
    "user" : doadmin,
    "password" : os.environ.get('DO_PASSWORD'),
}

However, I see that this doesn’t work, and instead get this error, anjar is my windows username. My postgres driver has always worked, the issue is purely me trying to connect to the remote cluster via these parameters.

FATAL:  role "anjar" does not exist


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 there @ajaramillocastro,

What is the SQL client that you are using to connect to your Managed Database Cluster?

As far as I can see from the error, it is just that your username is not picked up correctly by your SQL client and it defaults to your OS username.

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.