[codebox]pg_connect(): Unable to connect to PostgreSQL server: fe_sendauth: no password supplied
MySource Error
DB Error: connect failed [/codebox]
We are having someone install MySource Matrix for us and he is getting this error in Step 2. Any help on this would be greatly appreciated.
Pg_connect(): Unable to connect to PostgreSQL server: fe_sendauth: no password supplied
arweb
(Brad)
#1
Avi_Miller
(Avi Miller)
#2
You either need to provide a password for the PostgreSQL user or set pg_hba.conf to allow trusted connections.
arweb
(Brad)
#3
Where do you set the password for Postgre? The guy we have installing it said he couldn't find a place.
Thank you for your reply.
Avi_Miller
(Avi Miller)
#4
The DSN for PostgreSQL is in the following format:
pgsql://username:password@unix()/databasename
This works when PostgreSQL and Apache are on the same server. If you have separate boxes, you use something like this:
pgsql://username:password@server.domain.com/databasename
You will need to consult the PostgreSQL documentation on how to set a password for a PostgreSQL user (or, using pg_hba.conf remove the requirement for a password). Usually I use the following pg_hba.conf line:
# "local" is for Unix domain socket connections only local all all trust
This removes the requirement for a password for local connections (i.e. on the same box).