Installing PostgreSQL on Mac
Step 1: Use Homebrew
Homebrew is a package manager for macOS. If you don’t have Homebrew installed, install it first by running
Step 2: Install PostgreSQL
Once Homebrew is installed, run
Explanation: This command downloads and installs PostgreSQL via Homebrew.
Step 3: Start PostgreSQL
Start the PostgreSQL service.
Explanation: This ensures PostgreSQL runs in the background, even after restarting your Mac.
Step 4: Verify Installation
Check if PostgreSQL is running
Explanation: This shows all services managed by Homebrew and their statuses.
Access PostgreSQL:
Explanation: Opens the PostgreSQL interface connected to the default postgres
database.
Last updated