Rakesh Shetty
Rakesh Shetty

Reputation: 4578

Unable to connect to PostgreSQL 9.3

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.

Upvotes: 1

Views: 1423

Answers (1)

Rakesh Shetty
Rakesh Shetty

Reputation: 4578

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 !!

Upvotes: 1

Related Questions