---
title: "Brew Install Postgresql on OS X Lion"
author: "夜鸣猪"
date: "2012-10-12T21:08:09Z"
tags: []
categories: ["数据库"]
slug: "brew-install-postgresql-on-os-x-lion"
draft: false
lastmod: "2012-10-12T21:08:09Z"
id: 1697409
url: "https://hlee.iteye.com/blog/1697409"
---

> 
> 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"?
> 



> 
> createuser: could not connect to database postgres: 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"?
> 


need brew bin path

```ruby

#~/.bash_profile
PATH=/usr/local/bin:$PATH:$HOME/.rvm/bin:/usr/local/sbin:/usr/local/Cellar/

```