Re: Why password authentication failed for user "postgres"? - Mailing list pgsql-general

From Reid Thompson
Subject Re: Why password authentication failed for user "postgres"?
Date
Msg-id a1d7e88190ce75db9fc0f1e9d4325ada9c03a046.camel@nc.rr.com
Whole thread Raw
In response to Why password authentication failed for user "postgres"?  (BeginnerC <chuxuec@outlook.com>)
List 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





pgsql-general by date:

Previous
From: BeginnerC
Date:
Subject: Why password authentication failed for user "postgres"?
Next
From: Bryn Llewellyn
Date:
Subject: '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?