Take the 2-minute tour ×

Under the postgres user, I tried the psql command and I'm getting this error:


But when I run /usr/local/pgsql/bin/psql, it is working.

Is there anything wrong with my configuration?

share|improve this question
What does which psql show you? –  Milen A. Radev Sep 20 '12 at 6:21
@Milen, do you mean what is shown when I type the command psql? I already mentioned it above. –  eli Sep 20 '12 at 11:04
add comment

2 Answers

the above issue seems related to PostgreSQL default port no,

Change the port no in postgresql.conf file and restart the DB server. if u have changed the port while installing.


instead of psql type full command like

 "psql -p 5432 -h localhost"
share|improve this answer
add comment

You could include the database user too:

psql -U postgres -p 5432 -h localhost

share|improve this answer
add comment

Your Answer


