How do I fix the "Authentication Failed" error when connecting to PostgreSQL?

Validated on 20 Nov 2024 • Last edited on 18 Mar 2026

psql: FATAL:  password authentication failed for user "your_username"

An Authentication Failed error occurs when:

  • You connect to the wrong database cluster.
  • You use the wrong username or password.

If you are getting this error, check the cluster and username/password combination you’re using. To better review changes, we recommend the flags format to modify the connection string. For more on the flags format, see How To Connect to PostgreSQL.

How do I fix a "permission denied for schema public" error in PostgreSQL?

Update the user’s privileges to CREATE, USAGE, or ALL on the public schema.

How do I fix the pgvector "could not open extension control file" error?

Use the command CREATE EXTENSION vector; instead of pgvector.

How do I fix the pg_dumpall "permission denied for table pg_authid" error?

Add the –no-role-passwords flag to the pg_dumpall command.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.