I have forgotten the password that I used while installing postgres. It asks for the password for every action I perform. What can I do in this case?
I've even tried removing postgres and reinstalling it again, but it still asks for the password.
11 Answer
In general you can use the following procedure: Go to the terminal and type:
sudo -u postgres psqlWhen you're logged in and the psql prompt appears then issue this SQL command:
ALTER USER postgres PASSWORD 'newpassword';This may have consequences for any software using these login details too, so check if everything is still working after doing this.