Skip to content

Instantly share code, notes, and snippets.

@toranb toranb/postgres.txt
Created Dec 23, 2018

Embed
What would you like to do?
First time install of postgres on macOS Mojave
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
You can’t perform that action at this time.