Re: php connection failure - Mailing list pgsql-general

From Adrian Klaver
Subject Re: php connection failure
Date
Msg-id 5ae56ed6-ca48-b809-1e2d-85c36ca42f3e@aklaver.com
Whole thread Raw
In response to Re: php connection failure  (ourdiaspora <ourdiaspora@protonmail.com>)
Responses Re: php connection failure
List pgsql-general
On 8/10/21 1:59 AM, ourdiaspora wrote:
> 
> On Sunday, August 8th, 2021 at 1:51 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> 
>> 1.  Get rid of the first local line .
>> 2.  Then for the remaining local line below change peer to trust and
>>
>>      restart Postgres.
> 
> Thank you, but repeat error occurred:
> 
> sudo sudo service postgresql restart
> [ ok ] Restarting PostgreSQL 9.6 database server: main.
> 
> psql -d cpacweb  -U cpaca
> psql: FATAL:  Peer authentication failed for user "cpaca"

Then either:

1) There is another local line with peer that you missed.

2) You changed the wrong pg_hba.conf file.
What was the path of the file you changed?


What is returned when you do?:

ps ax | grep postgres


What do you see in:

sudo vi /var/log/postgresql/postgresql-9.6-main.log

when you do a restart?


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: php connection failure
Next
From: Christophe Pettus
Date:
Subject: Re: archive_command / single user mode