Setting up Postgres on Windows for frontend web dev
This is not my area of expertise (frontend guy), but I need postgres simply running on my side to connect with the test DB for the project I'm working on:
I have to run this before I start my project: dropdb [db_name] && createdb [db_name] && npm run migration:run:dev
When I do so, I get the typical:
dropdb: could not connect to database template1: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
This tells me that postgres isn't running on port 5432, which I verified in Resource Monitor and inside pgAdmin... in pgAdmin, all the PIDs are NOT 5432 and when I try to change the port to 5432 (although, already set to that), I get:
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
I have postgres installed via the packaged installer, and I've tried various solutions, such as: https://tableplus.io/blog/2018/10/how-to-start-stop-restart-postgresql-server.html Can't connect to Postgresql on port 5432 (I don't need remote connections)
Note(s)
I use homebrew to do this on my mac in like 2 commands... but services doesn't work with linuxbrew. I don't think my network is an issue if my mac has no problem with it on the same network.
I'm thinking something could be running on port 5432, but nothing appears to be in Resource Monitor.