I installed postgresql on windows and while the installation it asks to make a user for the account.This made a new windows user in my computer called postgres, I have created a password for it as well.
Now I want to run psql on windows command line, it asks for a password (without mentioning the user) and always gives me back the error: psql: FATAL: password authentication failed for user "Ash".
Even though I have put my accounts password many times.
using pgadmin I changed the user "postgres" to "Ash" but I have yet to remake the password. I followed the steps here: I forgot the password I entered during postgres installation (I rather types host all 127.0.0.1/32 trust
because I am on windows), but when running psql again so that I can change the password I get the error: psql FATAL:could not load pg_hba.conf.
All together.
Why can it not load? All I did was add an extra authentication option.
Also, is the windows user separated from a postresql user or are they the same(depend on each other)?
Edit:
As you can see, it did not give me the option to choose if Aisha should be a superuser or not. or the other options for that matter.
I also used pgadmin||| to create a new user but the same error pops up:
The user does not exist so why does it do this?
createuser
is a command-line utility. UseCREATE USER username WITH PASSWORD 'fred';
or similar at the SQL level inpsql
. Note the semicolon.What you're doing in your screenshot is starting to write an SQL command beginning with
createuser
, but never sending it to the server to run because there's no semicolon terminator. So you never get the error that would tell you it doesn't make sense to do that.