1

Recently, I have installed PostgreSQL 9.3 on my windows 7 64 bit PC but today I have formatted my PC. Now again I tried to install PostgreSQL 9.3 but after installation when I tried to connect it throws error See below screenshot :-

enter image description here

My pg_hba.conf is shown below :

enter image description here

I have also saw Postgres password authentication fails but nothing helps.

I am new to PostgreSQL,please help me on this.

3
  • 1
    You're using the wrong password. If you've lost/forgotten your password, you can change pg_hba.conf to use trust for long eough to reset it - see "reset postgres password". Commented Jul 11, 2014 at 5:26
  • @CraigRinger I have used the password which I have put during installation. Should I change method = Trust on pg_hba.conf ? Commented Jul 11, 2014 at 5:27
  • @CraigRinger I have change that to trust and restart but still it is asking for password and when I put the password it shows "role rakesh does not exist" Commented Jul 11, 2014 at 5:36

1 Answer 1

1

Finally I found the solution hope this will help to other users if they are facing the same problem :-

I have to edit pg_hba.conf file which is located in "C:\Program Files\PostgreSQL\9.3\data". In that file I have to make method md5 to trust as @Craig Ringer said. So the line will look like host all postgres 127.0.0.1/32 trust.

Then to restart the PostgreSQL on windows - Go to start > run > services.msc then restart the service.

Then open pg Admin create new server enter all the required details and save it. That's it !!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.