Search Postgresql Archives

Retrieve postgres password

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have lost/forgotten the postgres password for my installation so I did the following.

I edited pg_hba.conf and added an entry:

local all all trust

restarted postgresql.

loged in as postgres (psql template1 -U postgres)

change the postgres password with

ALTER ROLE postgres PASSWORD foo

I edited pg_hba.conf and get rid of the added line

restarted postgres

when I attempted to reenter with 

psql template1 -U postgres --password

I get an error Peer authentication failed for user "postgres"


Not sure what I did wrong, any help would be appreciated. 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux