Reputation: 1907
Unable to connect to PostgreSQL via IP.
Error Message: no pg_hba.conf entry for host
P.S: installation of Adobe Campaign Management
Upvotes: 0
Views: 5316
Reputation: 1907
pg_hba.conf
is configured to allow connections only from the pc the
database is installed on initially. Only one login account exists by
default after a new installation and that is the postgres account.
Until you connect to the db the first time using the postgres account
and create new users accounts will you have the option of using your
Owner account.
For connecting from another windows pc other than the one postgres is
running on the default postgresql.conf
file must be modified before
modifying pg_hba.conf
. Within postgresql.conf there is an entry
commented out, tcpip_socket = false
, uncomment that line and change it
to equal true.
Now you can modify the pg_hba.conf. Add a new line to that reads the
following:
host all all XXX 255.255.255.255 trust
XXX = the ip address of the computer that your application is running on. If your ip address is say 192.168.123.250 it is ok to enter it in pg_hba.conf as 192.168.123.0. The .0 acts a wildcard in case your computer is assigned a new ip address at a later time (hopefully it will be in the same range as the original...)
Once the above is done you can reboot the computer to stop and restart PostgresSQL.
Upvotes: 2