---
title: How to Fix an Authentication Failed Error When Connecting to PostgreSQL?
url: https://docs.vultr.com/support/products/storage/databases/postgresql/how-to-fix-an-authentication-failed-error-when-connecting-to-postgresql
description: Fix PostgreSQL authentication failures on Vultr by matching the username, password, host, and port to your cluster.
publish_date: 2025-09-15T13:57:48.256948Z
last_updated: 2026-10-26T23:32:32.674425Z
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

When connecting to a Vultr Managed Database for PostgreSQL, you may encounter an error like:

```
psql: FATAL:  password authentication failed for user "<username>"
```

This happens when PostgreSQL cannot verify your login credentials. It can occur if the `username` or `password` in your connection string does not match your cluster’s credentials, if you are connecting to a different cluster than the one your user belongs to, or if the `host`, `port`, or other connection parameters are incorrect.

To verify your connection settings, follow these steps:

* In the Vultr Console, open your PostgreSQL Managed Database cluster and confirm the **host**, **port**, **database name**, **username**, and **password** from the [Connection Details](https://docs.vultr.com/products/storage/databases/postgresql/management/connection/connection-details) section in the Overview page.
* For accuracy, **Copy the Connection String** directly from the Vultr Console and use it in your client or application.
* To reset the password for a user, navigate to **Users & Databases**, locate the target user in the **Users** section, and click **Reset Password**. Update your connection string with the new password.
* If you have multiple PostgreSQL clusters, ensure you are using the correct **host** and **port** for the intended cluster.
* If the error persists, check Allowed IPs in the **[Trusted Sources](https://docs.vultr.com/products/storage/databases/postgresql/management/connection/trusted-sources)** section of the Overview page, and add your current IP address before retrying.
