Unable to connect to POSTGRES and showing error - postgresql

I have a problem to connect server for Postgres after I installed it. When I try to psql -U postgres -h localhost it show this error:
psql: error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061)
Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061)
Is the server running on that host and accepting TCP/IP connections?
I have tried start/restart the postgresql-X64 service but it still show the error.

Related

Issue when accessing PostgreSQL 15 in pgAdmin4

Getting the following error when trying to access PostgreSQL 15 in pgAdmin 4 for the first time. Is this because I've messed up the passwords?
Error message: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (::1),port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections?
Any advice on solutions/ next steps would be ideal!

Docker in wsl, Error login pgadmin4, connection refused

when i tried to login in pgadmin4 with this credentials
i get this error
Unable to connect to server:
connection to server at "db" (172.18.0.3), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?

Can't connect to database PostgreSQL14. Can't start PostgreSQL on Windows services

When I starting to connecting, I catch error:
psql: error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061)
Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061)
Is the server running on that host and accepting TCP/IP connections?
PostgreSQL can't start on Windows services. (On my PC installed Win10)
This solution didn't help - https://stackoverflow.com/a/27568135/17655569
Also I tried reinstall with this instruction (https://webkul.com/blog/postgresql-windows-installation-problem-running-post-install-step-installation-may-not-complete-correctly/), unfortunately, this method help before the first computer reboot
Maybe anybody occurred with the same problem?

Connection refused when trying connecting to postgresql

#Edit
Sorry its not connect to PostgreSQL but im trying to connect to materialized shell but it's getting an error like below
psql: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 6875?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 6875?
how can i solve this?
Thanks.

Unable to push local database to heroku using pg:push

I am working on a Flask project, and I am ready to deploy my database to Heroku, but I am getting the following error when I try to push my local database to my PG database. I have searched through other StackOverflow posts, but no proposed solutions seem to work. Here is the error message:
pg_dump: [archiver (db)] connection to database "database-name" failed: could not connect to server: Connection refused
`Is the server running on host "localhost" (::1) and accepting`
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (fe80::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
pg_restore: [archiver] input file is too short (read 0, expected 5)
psql: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (fe80::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: psql failed. exit status 512, output: "" (RuntimeError)
Command: heroku pg:push database-name DATABASE_URL --app app-name
Version: heroku-toolbelt/3.39.5 (x86_64-darwin10.8.0) ruby/1.9.3
Error ID: 020bc5cc53ec48298f24125be8705f53
Any insight would be much appreciated. I have been struggling with this for several hours. Thanks!