Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I can connect to db with trust, but it is not letting me to connect with md5. It says : "password authentication failed for user "postgres""

Here what I have in pg_hba.config

host    all all 192.168.1.200/32    md5
#host   all all 192.168.1.200/32    trust

When I un-comment the seccond line and reload the configuration everything works fine.

What can be an issue ?

share

migration rejected from stackoverflow.com Mar 9 at 14:42

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by dezso, Max Vernon, RolandoMySQLDBA, Mark Storey-Smith, Michael - sqlbot Mar 9 at 14:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – dezso, Max Vernon, RolandoMySQLDBA, Mark Storey-Smith, Michael - sqlbot
If this question can be reworded to fit the rules in the help center, please edit the question.

2  
You entered a wrong password? –  Milen A. Radev Dec 6 '13 at 1:51

1 Answer 1

Are you sure you have the right password?

If you have forgotten your password, try resetting to trust first, and then running the following sql statement to set the password:

alter user postgres with password 'the_password';

Then you should be able to connect using md5 auth and the_password as the password

share