Created
December 23, 2018 14:05
-
-
Save toranb/fb2836422f9cd67f760fccaeca3ad8a8 to your computer and use it in GitHub Desktop.
First time install of postgres on macOS Mojave
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
1) Install homebrew if you haven't already | |
https://brew.sh/ | |
2) Install postgres | |
brew install postgresql | |
3) Start the database | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start | |
4) Connect to postgres | |
psql postgres | |
5) Add a new role for "postgres" | |
CREATE ROLE postgres superuser; | |
6) Give this role login | |
ALTER ROLE "postgres" WITH LOGIN; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment