Skip to content

Instantly share code, notes, and snippets.

@iamvery
Last active January 21, 2024 10:12
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save iamvery/5493645 to your computer and use it in GitHub Desktop.
Save iamvery/5493645 to your computer and use it in GitHub Desktop.
Setup Postgres.app to allow connection via unix socket

These are instructions to setup Postgres.app to allow connections over unix sockets. These instructions were written for Mac OS X 10.8 (Mountain Lion).

  1. Run Postgres.app once so that the configuration is initialized in ~/Library/Application Support/Postgres.
  2. Close Postgres.app
  3. Open ~/Library/Application Support/Postgres/var/postgresql.conf in your favorite text editor.
  4. Uncomment the line unix_socket_directory = '' and change it to unix_socket_directory = '/var/pgsql_socket'
  5. Create the directory /var/pgsql_socket if it doesn't exist.
  6. Run chmod 770 /var/pgsql_socket (may need to be run with sudo)
  7. Run chown root:staff /var/pgsql_socket (may need to be run with sudo)
@brentmulligan
Copy link

Worked perfect. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment