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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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    md5
#host   all all    trust

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

What can be an issue ?


migration rejected from Mar 9 '14 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 '14 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.

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

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