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

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

Submit an 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