Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I installed PostgreSQL on my Windows 7 machine a few weeks ago. Now I would like to create a database with createdb mydb but I don't remember the password.

Is there anyway to reset the password? I have access to the Administrator account on my machine. Or do I have to uninstall PostgreSQL and then reinstall it again?

How can I reset the password on a PostgreSQL database on my machine?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Edit pg_hba.conf to allow access without a password, use "trust". Restart postgresql and you can access PostgreSQL without the usage of a password. Alter your password to something you can remember :) , edit pg_hba.conf again and reload pg_hba.conf.

The Ubuntu-manual has a description about this issue as well.

share|improve this answer
    
Where in the pg_hba.conf should I put trust? do you have an example? –  Jonas Dec 9 '10 at 12:57
1  

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.