Error AtlasError Documentation and Resolution

PostgreSQL 28P01: password authentication failed

password authentication failed for user "user_name"

SQLSTATE 28P01 is invalid_password. The client reached a PostgreSQL server but failed password authentication for the requested role. This is different from a connection timeout or missing pg_hba.conf rule. First verify the endpoint and role before changing a password that may be correct for another database environment.

password authentication failed for user "user_name"
  • The application is using an outdated, missing, or incorrectly copied password after a secret rotation or deployment.
  • The host, port, or role points to a different PostgreSQL instance, or a connection URI misinterprets reserved characters in the credentials.
  • The database role has no usable password, or the configured authentication method and stored password format do not match the intended setup.
  1. Compare the host, port, database, and role with the approved environment configuration. Inspect which secret version the process loaded without printing the secret, complete connection URL, or password hash.
  2. Test with a current psql client using explicit connection fields and its interactive password prompt, preserving the required TLS settings. If this works but the application fails, investigate its environment loading, stale pool configuration, and configuration precedence.
  3. If using a PostgreSQL connection URI, percent-encode reserved characters within credential components exactly once, or use the driver's separate connection fields. Do not paste credentials into public URL decoders or issue trackers.
  4. Ask the database administrator to inspect the corresponding server log and first matching pg_hba.conf rule. A password-authenticated role needs a configured database password; the operating-system login password is not automatically the same.
  5. When rotation is necessary, use an approved secret-management flow or psql \password through an authorized session, then update dependent applications and verify new connections. Keep SCRAM-capable clients current. Never switch authentication to trust, weaken TLS, or expose credentials merely to make the login succeed.
PostgreSQL documentation: SQLSTATE error codes