Password Problem

Posted:
Sat Feb 13, 2010 10:29 am
by jimmyzhou
Hi,
I have Postgre 8.4 installed. I have forgotten my password to connect to the server, and 'dbpass' is not working.
The tutorial for resetting the password uses Postgre 8.3, and the edit pg_hba.conf link is not in the programs menu for 8.4 (it seems). I opened pgAdminIII and under 'File' it has an option to open pg_hba.conf, but when I do I get a blank window.
I'm probably doing something stupid but I appreciate any help.
-Jimmy
Re: Password Problem

Posted:
Sat Feb 13, 2010 11:18 am
by WhiteRider
You can open that file manually - it is somewhere like:
c:\program files\PostgreSQL\8.4\data
Use Notepad, and run it as administrator (right click > Run As Administrator) so that you can save your changes.
Re: Password Problem

Posted:
Sat Feb 13, 2010 1:13 pm
by jimmyzhou
Thank you WhiteRider, it worked!
Re: Password Problem

Posted:
Wed Feb 17, 2010 10:07 pm
by tazztaz
WhiteRider wrote:You can open that file manually - it is somewhere like:
c:\program files\PostgreSQL\8.4\data
Use Notepad, and run it as administrator (right click > Run As Administrator) so that you can save your changes.
I am some what PC illiterate, Could one of you please explain witch file to open and witch fields to edit?
Re: Password Problem

Posted:
Thu Feb 18, 2010 9:42 am
by kraada
Click Start, click All Programs, click Accessories, right click Notepad and click Run As Administrator.
Click File, click Open, click Computer, double click C: then PostgreSQL then 8.4 (or 8.3 if that's what you have), then data. Make sure the drop down on the lower part of the screen says All Files (*.*) if it says Text Files (*.txt) change it to All Files. Select the pg_hba.conf file (it may just look like pg_hba though), and click Ok.
Scroll to the bottom of the file, change 'md5' to 'trust' (you don't need the quotes).
Click File, click Save.
Click Start, click All Programs, click PostgreSQL 8.4, click Stop Server. Click Start, click All Programs, click PostgreSQL 8.4, click Start Server. You should now be able to connect.