Shell Person Help me keep the shell people alive.


New Location for org.postgresql.postgres.plist in 2.1.1

In 2.1.1 for OSX Mountain Lion, the PostgreSQL configuration file has been moved from


to its new location at


You no longer need administrative privileges to edit it.


Connect to OSX postgresql on Mountain Lion

Here are a few notes to remind myself how to connect to the default postgres instance used by OSX on Mountain Lion.

  1. Enable "Websites" in
  2. Check if postgres is running
  3. sudo serveradmin fullstatus postgres
  4. If it's not, turn it on
  5. sudo serveradmin start postgres
  6. In order to connect with pgAdmin (and maybe through the terminal too), edit the file

    to replace



  7. UPDATE: The config file moved in the 2.1.1 update. It's now at:

  8. Then restart postgres
  9. sudo serveradmin stop postgres
    sudo serveradmin start postgres
  10. Now, connecting with psql in terminal still causes this error (use template1 as the database name if you don't already have a database set up):
  11. server:~ shellperson$ psql template1
    psql: could not connect to server: Permission denied
    	Is the server running locally and accepting
    	connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
  12. My preference to work around this is to create a user named "root" in the database, so I can just login with sudo. In order to do this, first login as the default user (_postgres). Use your own password.
  13. server:~ shellperson$ sudo -u _postgres psql template1
    psql (9.1.4)
    Type "help" for help.
    template1=# create role root login;
    template1=# \q

    Once the user is created, you can login with "sudo psql databaseName".

    server:~ shellperson$ sudo psql template1

Articles referenced: