0

I have installed PostgreSQL to my Mac OS X (10.6), specifically the EnterpriseDB. In the applications was created the folder PostgreSQL 9.1 and there is SQL Shell (psql).app. After opening this app is opened terminal window, where is on the command line Server [localhost]:.

I am a bit confused of that, how can I work/log-in to this DB system? I am habit on MySQL, where I just type to the terminal window mysql -u username -p password and everything is prepared to work, but here I am a bit confused... How can I log-in to PostgreSQL database>

EDIT

locate psql | grep /bin

WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:

  sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.

1 Answer 1

1

you can login with psql. You don't need a password, if your unix-account name matches the db-account name and the sever is on localhost. At least that's the default in postgreSQL (check for ident in pg_hba.conf).

If you want to use a different db-user, check "psql --help".

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

2 Comments

when I type psql, I'll get -bash: psql: command not found. When I try to run locate psql | grep /bin, I got the error, that I posted to the original post (longer statement). How to fix that?
try this to find the binary: find / -name psql

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.