0

I'm working in this Django app but I stopped working on it per two weeks, so my computer was off during this time. Now I want to work on it again this error appear to me over and over again in my command line, I opened pgAdmin and found is because I need my password for my postgres user and I can't remember it. Does anybody knows how to fix this?

enter image description here

1
  • your error says nothing on authentication. it looks postgres cluster is not running - just start it. Commented Apr 19, 2018 at 7:18

1 Answer 1

1

The postgres account has no password (by default). You should not be using this account to connect to the database. If you are using a linux distribution, you can execute the following command in order to create another user account that you can use for login:

sudo -u postgres psql -c "create user newuser with superuser password 'new_password_123';"

This way you will create a user with username newuser and password new_password_123

There is also another way to reset the password that is explained in this question.

Sign up to request clarification or add additional context in comments.

3 Comments

I tried that way and obtained: Password: could not identify current directory: Permission denied psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Are you sure that your postgresql server is running ?
Yes, my server was running but I can't find what happened so I had to create another DB.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.