Psycopg2.Operational€rror: connection to server at "127.0.0.1", port 5432 failed: Connection refused

Hello friends and mentors, am trying to deploy a project and these are the error I am facing when I run python manage.py migrate on digital ocean Note that am using windows, most of the commands as PostgreSQL is concerned don't run, I try to fix that with Cygwin but I still can't run them, I have git bash, obuntu WSL but there are commands I cant still, hey I am still rookie 🙈, I will so much appreciate any help for example when i run service postgresql start this in any of those terminal i get bash: service: command not found

apps@cajetanglobal-66bd7dcc9b-2jjtd:~$ python manage.py migrate

Traceback (most recent call last): File “/workspace/.heroku/python/1ib/python3.10/site-packages/django/db/backends/base/base.py”, line 219, in ensure_connection self.connect() File "/workspace/.heroku/python/1ib/python3.10/site-packages/django/utils/asyncio.py", line 33, in inner return func(*args, **kwargs) File “/workspace/.heroku/python/1ib/python3.10/site-packages/django/db/backends/base/base.py", line 200, in connect self.connection = self.get_new_connection(conn_params) File “/workspace/.heroku/python/1ib/python3.10/site-packages/django/utils/asyncio.py”, line 33, in inner return func(*args, **kwargs) File “/workspace/.heroku/python/1ib/python3.10/site-packages/django/db/backends/postgresql/base.py”, line 18 7, in get_new_connection connection = Database.connect(**conn_params) File "/workspace/.heroku/python/1ib/python3.10/site-packages/psycopg2/init.py", line 122, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync psycopg2.Operational€rror: connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections?

The above exception was the direct cause of the following exception: I have attached a link of the screenshot

Back to Top