Installing Postgres on MAC

  1. brew install postgres
  2. initdb /usr/local/var/postgres
  3. To start server at startup
  4. mkdir -p ~/Library/LaunchAgents
  5. ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
  6. launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
  7. /usr/local/Cellar/postgresql/<version>/bin/createuser -s postgres

Now, it is set up, login using psql -U postgres -h localhost or use PgAdmin for GUI.

By default user postgres will not have any login password.

Originally published at sites.google.com.

--

--

--

Applied Deep Learning Engineer | LinkedIn

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nitin Pasumarthy

Nitin Pasumarthy

Applied Deep Learning Engineer | LinkedIn

More from Medium

Install WSL 2 + Ubuntu 20.04 LTS on Windows 10 and open Visual Studio Code from the terminal

SonarQube Mac Installation in 5 Minutes

How to outsource your Devcontainer configuration

Running Firebird the Open-Source Database on MacOS and docker

Firebird logo