Regarding the pg_hba.conf
file, the only host connections that were changed to trust
were the ones shown in the docs.
What the docs show: ---------------------------------------------------------------------------------
local all all trust
host all all ::1/128 trust
What my pg_hba.conf
file looks like: ----------------------------------------------------------
DO NOT DISABLE!
If you change this first entry you will need to make sure that the
database superuser can access the database using some other method.
Noninteractive access to all databases is required during automatic
maintenance (custom daily cronjobs, replication, and similar tasks).
Database administrative login by Unix domain socket
local all postgres peer
TYPE DATABASE USER ADDRESS METHOD
âlocalâ is for Unix domain socket connections only
local all all trust
IPv4 local connections:
host all all 127.0.0.1/32 scram-sha-256
IPv6 local connections:
host all all ::1/128 trust
Allow replication connections from localhost, by a user with the
replication privilege.
local replication all peer
host replication all 127.0.0.1/32 scram-sha-256
host replication all ::1/128 scram-sha-256
------------------------------------
As for what happens when I run psql -h localhost -U <MMUSER>
, I get the following:
psql: error: connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "mattermost"
It seems to not accept my database user, and only the database name when I run your command. My MM DB user is âmmuserâ since I didnât feel the need to change it. When I run that command with my actual MM DB user I get the following: psql: error: connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: database "mmuser" does not exist
. However, when I run your command with the actual database name âmattermostâ it gets to the password authentication error.
âpsql by default connects to a local socket. âlocalhost"5432â is connecting to a TCP socket. So Iâm guessing your postgres doesnât know to listen on that socket, or something like SELinux isnât allowing the connection.â
The original port # for my PSQL DB was 5433 but for some reason MM was trying to connect to 5432 so I changed my PSQL DB port # to 5432 which fixed my old connection error where MM would try to connect to 5432 even though my DB port was 5433. After I solved that error Iâm now experiencing this error which I genuinely donât know how to solve. your postgres doesnât know how to listen on that socket does this have to do with the /main/postgresql.conf
file where listen_addresses
is located?
Thank you in advance for the reply.