79454612

Date: 2025-02-20 13:11:46
Score: 0.5
Natty:
Report link

✅ How to fix it

The issue happens because PostgreSQL is already running on your Mac and is using port 5432, which conflicts with your Docker container. Here’s how you can resolve it:

1️⃣ Stop PostgreSQL properly on macOS

Since you installed PostgreSQL via Homebrew, the correct way to stop it is:

brew services stop postgresql

Then, check if the port is still in use:

sudo lsof -i :5432

2️⃣ Kill the process manually (if needed)

If PostgreSQL is still running, force it to stop by killing the process:

sudo kill -9 521  # Replace 521 with the actual PID

Then, verify again:

sudo lsof -i :5432
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Wellynton Spagnol