Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I started working with PostgreSQL and till now I only had issues with it ( pgAdmin3 issues the most ) now I work a lot with MySQL and sometimes on the command line by just doing

mysql -u ... -h localhost -p for example and I'm connected through the command line.

Is there also a way to connect to the PostgreSQL database without pgAdmin and run it through the command line (Terminal) (I am working on OS X Mountain Lion).

p.s. I am also not a real big fan of letting PostgreSQL create a user. It annoys me when I start up my Mac and see PostgreSQL as user in the login screen. Is it possible to avoid that?

share|improve this question
See for information about hiding users in Mac OS X. – Colin 't Hart Apr 17 '13 at 8:09
up vote 4 down vote accepted

The PostgreSQL command line client is called psql. You can do pretty much everything with it (apart from taking dumps, for example), you'd better reading its documentation. Try running locate psql in a terminal and you will find its binary.

As far as I know, on OS X (and typically on other systems, too) pgAdmin is bundled with the server package, so you won't be able to install PostgreSQL without it. Here I am not very well informed, so handle this with care.

Regarding the postgres user, on linux machines it is a must to have it (and again, it looks the same on all other systems, too), you simply cannot run the server with other users. If you don't use PostgreSQL, the user will sit there quietly, won't eat your food and drink your beer, so you need not to worry about it.

share|improve this answer
+1 apart from taking dumps – morne Sep 17 '14 at 9:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.