PostgreSQL error 28P01: password authentication failed
PostgreSQL received the connection attempt but rejected password authentication for the supplied user.
password authentication failed for user "docs_user"SQLSTATE: 28P01The quoted user name comes from your connection.
What error 28P01 means
Section titled “What error 28P01 means”The server could not authenticate the database account with the supplied credentials. An incorrect password, an unknown user, or the wrong server can produce this error. A network timeout is a different problem.
Common causes
Section titled “Common causes”- A saved password predates a password reset or credential rotation.
- The user name belongs to a different server or endpoint.
- The host or port reaches another PostgreSQL installation.
- A local socket login uses different authentication rules from a TCP login.
Fix PostgreSQL error 28P01
Section titled “Fix PostgreSQL error 28P01”- Edit the saved connection using connection basics.
- Compare Host, Port, Database, and User with the intended server.
- Enter the current database password.
- Click Test.
- Save the corrected connection after a successful test.
Use the check for your setup:
| Setup | Check |
|---|---|
| Local PostgreSQL | A password-free Terminal socket login does not verify the TCP password. |
| Docker | Match the published port and the credentials in the existing database volume. |
| Cloud | Obtain fresh database credentials and use all fields from one direct or pooled connection choice. |
| Company server | Ask the administrator to confirm the role and reset its password through your approved process. |
For endpoint-specific credentials, see Supabase, Neon, or Heroku.
Keep password authentication enabled while correcting the account. Disabling it can permit unauthorized access.
How TableAI shows it
Section titled “How TableAI shows it”The connection failure includes PostgreSQL’s authentication message. Use the server error to distinguish a rejected password from an unreachable host. If you need administrator help, provide the endpoint, database user, error code, and time through an approved channel; never include the password.
Related
Section titled “Related”- PostgreSQL overview.
- Connection failed if the error changes to a timeout or refusal.
- Write and run SQL after access is restored.