Databaseexit code > 0
psql: error: FATAL: password authentication failed
$psql: error: FATAL: password authentication failed for user "postgres"
Analysis
PostgreSQL rejected the connection because the password provided for the user is incorrect or missing.
Common Triggers
- ●Wrong password in environment variables or
.pgpass. - ●Incorrect
pg_hba.confconfiguration on the server.
Debug Checks
- $Verify the password works via other clients.
- $Check PostgreSQL logs on the server for more detail.
Resolution
1
Update the password in your connection string or environment.
2
Verify the user exists:
\du in psql.Metadata
- Tool
- Database
- Severity
- High
- Tags
- #database#postgres#auth