Installing PostgreSQL on Windows
-
23-08-2019 - |
Question
I'm in a bit of a mess here. I installed PostgreSQL on my Vista computer a couple of days ago but then when asked to enter the password for the postgre user account I couldn't remember it (allegedly I was asked during setup but I don't remember that).
Anyway, so I uninstalled Pg with the intention of reinstalling it, removed the user account, it's /Users/ directory and it's special privelleges ("Advanced user profile properties") but when I come to install Pg it seems to think the account still exists as when I supply a password during setup it says that it is not the correct password - meaning that the account still exists somewhere.
Is there anyway I can recover this?
Solution
Go to Control Panel -> Administrative Tools -> Computer Management. There under "Local Users and Groups" you can see all users created for your system. Remove "postgres" and reinstall PostgreSQL.
OTHER TIPS
Open a command prompt with the administrator rights. i.e. Right click on command prompt icon -> Run as Administrator
Use the following command to change the password:
!important: CASE and SHOULD BE RUNNING AS ADMINISTRATOR
NET USER postgres <NEW_PASSWORD>
On Vista you can go to Control Panel -> User Accounts -> Manage Another Accounts then select user postgres, change the password if you forget your last password.