From: Reid Thompson <jreidthompson@nc.rr.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Why password authentication failed for user "postgres"?
Date: Fri, 03 Jun 2022 18:38:35 -0400
Message-ID: <a1d7e88190ce75db9fc0f1e9d4325ada9c03a046.camel@nc.rr.com> (raw)
In-Reply-To: <TYAP286MB06367FE5D4BB0EE26F8D313FA9A19@TYAP286MB0636.JPNP286.PROD.OUTLOOK.COM>
References: <TYAP286MB06367FE5D4BB0EE26F8D313FA9A19@TYAP286MB0636.JPNP286.PROD.OUTLOOK.COM>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: jreidthompson@nc.rr.com
Subject: Re: Why password authentication failed for user "postgres"?
In-Reply-To: <a1d7e88190ce75db9fc0f1e9d4325ada9c03a046.camel@nc.rr.com>
References: <TYAP286MB06367FE5D4BB0EE26F8D313FA9A19@TYAP286MB0636.JPNP286.PROD.OUTLOOK.COM> <a1d7e88190ce75db9fc0f1e9d4325ada9c03a046.camel@nc.rr.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox