Skip to content

Instantly share code, notes, and snippets.

@Calamari
Created August 8, 2013 19:10
Show Gist options
  • Save Calamari/6187712 to your computer and use it in GitHub Desktop.
Save Calamari/6187712 to your computer and use it in GitHub Desktop.
How to install postgres on mac (incl. creating a user and a database)
# Install Postgres on mac
Install it
``` bash
brew install postgres
initdb /usr/local/var/postgres -E utf8
```
Start database
``` bash
postgres -D /usr/local/var/postgres
```
Log in into database
``` bash
psql template1
```
Create user and database
``` sql
CREATE USER calamari;
CREATE DATABASE comments_development;
GRANT ALL PRIVILEGES ON DATABASE comments_Development to calamari;
\q
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment