✅ Step-by-Step: Install PostgreSQL via EDB Installer (No Brew)
đ 1. Download the Installer
Go to the official PostgreSQL download page:
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
Choose:
-
Version: PostgreSQL 17.5 (or your target version)
-
OS: macOS
-
Click Download under “Interactive Installer by EDB”
This downloads a .dmg
installer package.
đģ 2. Install PostgreSQL
-
Open the downloaded
.dmg
file -
Run the installer
-
Follow the prompts:
-
Choose install location
-
Set a password for the
postgres
user (IMPORTANT — remember it) -
It will also install:
-
pgAdmin (optional)
-
Command line tools
-
-
This will install PostgreSQL to:
/Library/PostgreSQL/17/
đĒ 3. Verify Installation
Open Terminal, then run:
/Library/PostgreSQL/17/bin/psql --version
Expected output:
psql (PostgreSQL) 17.5
đ ️ 4. Add to PATH (Optional but Recommended)
echo 'export PATH="/Library/PostgreSQL/17/bin:$PATH"' >> ~/.zprofile
source ~/.zprofile
Now you can run:
psql -U postgres
Enter the password you set during installation.
đ 5. Create a New Database
createdb -U postgres my_database
Or connect to the default DB:
psql -U postgres -d postgres
đ 6. Import a SQL Dump File
If your client gave you a .sql
file:
psql -U postgres -d my_database -f /path/to/file.sql
đ§đģ 7. Use TablePlus to View Data
Use the following settings to connect:
Field | Value |
---|---|
Host | 127.0.0.1 |
Port | 5432 |
User | postgres |
Password | (your password) |
Database | my_database |
Now you're ready to work with PostgreSQL on your MacBook Pro without using Homebrew!
Let me know if you need help with Laravel connection setup or importing data.
No comments:
Post a Comment