0

I have a PostgreSQL 9.3 DB which I want to connect with no password from localhost only. If connection is made from any other server, then I want the DB to prompt for a password. I just want no password connection from localhost only. The pg_hba.conf looks like:

# TYPE  DATABASE        USER            ADDRESS            METHOD

# "local" is for Unix domain socket connections only
local   all             all                                password
# IPv4 local connections:
host    all             all             localhost          password
# IPv6 local connections:
host    all             all             all                password
Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228
WinSupp
  • 361
  • 2
  • 6
  • 20
  • So why are you asking for "password" if you don't want to use one? The manuals list the options available. Which one do you think you want and what happens when you try it. – Richard Huxton Aug 26 '14 at 21:40
  • Did you [read the manual](http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html)? – Craig Ringer Aug 27 '14 at 01:31
  • If I change it to `host all all localhost trust' , then I am able to connect to the DB without entering a password from the same computer however I am unable to connect from any other server – WinSupp Aug 28 '14 at 17:45

0 Answers0