6

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?

asked Sep 17, 2014 at 9:19
5
  • Try the user postgres is running as. Commented Sep 17, 2014 at 9:20
  • Sorry, what do you mean. I dont understand Commented Sep 17, 2014 at 9:22
  • 1
    First, why on earth would you install PostgreSQL 9.0? It's an old release. Anyway ... if psql -h localhost -U postgres fails, then whatever password you're entering isn't the password you entered in the installer. You can reset the password though: dba.stackexchange.com/q/19643/7788 Commented Sep 17, 2014 at 12:20
  • In the meantime I uninstalled 9.0 and installed 9.3. made 101% sure i entered 'password'. Getting the same issue. Will try this reset though. UPDATE Tried the update password method. Still says pass auth failed Commented Sep 17, 2014 at 12:42
  • In that case, at a guess you have multiple PostgreSQL versions installed and running on different ports. The one you just installed must be running on a port other than the default port 5432. The installer asks you what port you want to use, but if you don't remember you can find it in postgresql.conf in your data directory inside the install, or you can try port 5433, 5434, etc. Commented Sep 17, 2014 at 13:00

1 Answer 1

2

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.

answered Sep 17, 2014 at 13:27

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.