0

I've installed PostgreSQL 9 on my local mac and it installed the "SQL Shell (psql).app" which I assume is the command shell for the server. I've opened it up but it asks for a Username [postgres]:. I type in postgres and then it asks for a password. I press enter and it gives the following error:
psql: fe_sendauth: no password supplied

How do I log in and more importantly how do I run commands like createdb? I tried the createdb command in my normal Terminal window but the command is not recognized.

Should I be using Homebrew or Macports? I haven't used either of these being new to the Mac OS

Thanks for your help!

2
  • What installation method did you use? Commented Sep 8, 2011 at 5:40
  • I downloaded and installed postgresql-9.0.4-1-osx.dmg Commented Sep 8, 2011 at 6:21

2 Answers 2

1

I had this problem and removing the host and port parameters from database.yml fixed it for me:

development:
  adapter: postgresql
  encoding: unicode
  database: my_db
  pool: 5
  host: localhost # remove this line
  port: 5432 # and this one
Sign up to request clarification or add additional context in comments.

Comments

0

If your postgres user doesn't have a password, set this env variable:

export PGPASSWORD=

1 Comment

where do I do this? Sorry I am new to Unix in general

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.