Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

psql: FATAL: Password authentication failed for user “postgres” WINDOWS

Tags:

sql

postgresql

I just installed postgresql 9.0 on my pc.
When it ask for password during install, I entered password.

after install I went to command prompt to import a SQL file.
I use the command psql -f filename.sql. This prompts me for a password to which I enter password.

It then complains that authentication failed for user Morne Nel. I dont exist as a user yet.

I then tried psql -h localhost -U postgres to which I enter the password password.
Only to get this message:
FATAL: Password authentication failed for user "postgres"

What Can I do to resolve this madness?

# Could it be that Jasper Reports server might have something to do with it, is also installs prostgres does iet not?

like image 854
morne Avatar asked Sep 17 '14 09:09

morne


1 Answers

So is seems that Jasper Reports Server was the culprit here.
Jasper was running on port 5432 and Postgres 9.3 was running on port 5433

I knew that it was on port 5433 from install, but I just assumed that if you try and run command prompt commands that it would use the correct port.

So after uninstalling Jasper Reports Server and changing the port number for Posgres 9.3 in the config file to 5432, I restarted my PC and it worked.

like image 185
morne Avatar answered Sep 22 '22 03:09

morne