Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postgres pg_hba.conf

There is server being set-up for one of my client, after installations of postgres when we run the server we are encountering the error below. When I goggled for it there were a few solutions available but none worked for me, could you look into it and say what's happening.

Status: 500 Internal Server Error
FATAL:  no pg_hba.conf entry for host "127.0.0.1", user "syr_admin", database     "allprosh_production", SSL off

My pg_hba.conf file:

local all  all      md5
host samerole all  127.0.0.200   255.255.255.255   pam  pamservice=postgresql_cpses
host samerole all  127.0.0.1   255.255.255.255   md5
local all postgres        md5
host all postgres  127.0.0.1   255.255.255.255   md5
local   all     all     trust  

Thanks in Advance.

like image 736
rajesh023 Avatar asked Dec 05 '13 05:12

rajesh023


1 Answers

I figured it out myself, though it took a long time. The solution was simple, I just had to add an entry in the pg_hba.conf file for that particular user. This is what I did:

local all syr_admin  md5
host all syr_admin 127.0.0.1   255.255.255.255   md5

Hope this helps others... :-)

like image 51
rajesh023 Avatar answered Nov 15 '22 10:11

rajesh023