Re: Why password authentication failed for user "postgres"?

From: Reid Thompson <jreidthompson(at)nc(dot)rr(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Why password authentication failed for user "postgres"?
Date: 2022-06-03 22:38:35
Message-ID: a1d7e88190ce75db9fc0f1e9d4325ada9c03a046.camel@nc.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 2022-06-04 at 06:32 +0800, BeginnerC wrote:
> Hello everyone,
> I am a newbie to the postgres,when I use the psql to connect to the
> postgres,a error message printed:
> These command list like this:
>
> psql -U postgres
> Password for user postgres:postgres
> postgreSQL: password authentication failed for user "postgres"
>
> How to solve this problem?
> Thanks in advance!

this may work...

switch user to postgres.
$ sudo su - postgres
login to postgres
$ psql 
reset the password for postgres
postgres-# \password

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bryn Llewellyn 2022-06-04 01:41:43 '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?
Previous Message BeginnerC 2022-06-03 22:32:16 Why password authentication failed for user "postgres"?