0

I have installed PostgreSQL on my CentOS 6.5

I have installed the same with http://www.enterprisedb.com/products-services-training/pgdownload

Now Postgres is running on 5432 that I have checked with

netstat -ant|grep 5432

but when I run a command like postgres or psql I am getting error that

command not found

Please find attached image of the same.

enter image description here

4
  • You need to put those programs into your PATH Commented Jul 25, 2016 at 9:00
  • how can I do that? Commented Jul 25, 2016 at 9:00
  • duckduckgo.com/?q=linux+change+PATH&t=hd&ia=web Commented Jul 25, 2016 at 9:01
  • done. but now when I hit command psql, it asks for password and when I put the password which I have set at the time of installation. it says invalid password. Commented Jul 25, 2016 at 9:09

1 Answer 1

1

Are you sure you want to be doing this as the root user and not as the postgres user?

If you login as the postgres user you'll have the right path and "psql" will connect as the postgres user.

Alternatively, you could say "psql -U postgres" and then when you're prompted for a password, the one that you selected at install time should work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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.