database - Password in postgres 8.3 not working -
i have installed postgres 8.3, entered test password while installation...my problem each time try access local database...each time enter password...it database connecting failed...i have tried change password via command line not work...even tried change configuration file...it not work...is there way out me make database work? reply...
often people cannot connect postgres password because configured default use ident authentication local connections. try switching postgres system account , connecting username. if in without password you're configured ident. can check authentication methods in pg_hba.conf.
if want switch using passwords local connections, can modify setting in pg_hba.conf. @ bottom of file there's section this:
# not disable! # if change first entry need make sure # database # super user can access database using other method. # noninteractive # access databases required during automatic maintenance # (autovacuum, daily cronjob, replication, , similar tasks). # # database administrative login unix sockets local postgres ident sameuser # type database user cidr-address method # "local" unix domain socket connections local md5 #ident sameuser # ipv4 local connections: host 127.0.0.1/32 md5 # ipv6 local connections: host ::1/128 md5
you can see on second "local" line have changed setting use md5 authentication instead of ident sameuser. allows me log in database user system account using correct password. if make same change , restart postgres might solve problem.
be careful not change first "local" line. postgres user super user , if change authentication mechanism may not able in.
Comments
Post a Comment