Created
August 8, 2013 19:10
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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