0

hi am following the following tutorial

https://www.youtube.com/watch?v=qw--VYLpxG4&t=2224s

and when i add psql into my path and then type it into the terminal it asks for my administrator datails of which i give then it shows this

psql: error: FATAL:  password authentication failed for user "aarushsharma"

how do i find out the password for aarushsharma?

aarush_s
  • 91
  • 1
  • 1
  • 7
  • You specified the password when you created the user `aarushsharma` so you are the only one who knows that password –  Mar 01 '21 at 16:20
  • i never created an account in postgresql with the name ```aaarushsharma``` but i do have it on my desktop thats why i assumed it had my desktop credentials and thats when it said the error – aarush_s Mar 01 '21 at 16:25
  • then why do you try to connect with that user? To specify a different user use `psql -U ....` –  Mar 01 '21 at 16:26
  • @a_horse_with_no_name because that username has postgis installed i managed to install it through postgres app but i can't install postgis on the default postgres user so i want to try and login to the other user – aarush_s Mar 01 '21 at 17:42

1 Answers1

0

try to change METHOD in pg_hba.conf file from md5 to trust, restart postgresql server and change your user password

ALTER USER aarushsharma WITH PASSWORD 'your_password';

and set METHOD to md5 again