Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including
Stack Overflow
, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this community
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Ask Question
I have Postgres 13 and pgAdmin installed on my Windows machine. It worked for like ~six month, until I hat do restart my machine. After restarting the computer (which I had not
done
because there was an update), I am trying to connect to Postgres via pgAdmin as always and I get this
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?
Some answeres suggest, to edit the
postgresql.conf
file which I a) do not find in my postgres installation and b) I think is not the correct solution for me because it worked without any problem until I restarted my machine.
Why is that? It feels like postgres is not starting? Although this is a wild guess...
I went to
Control Panel->Administrator Tools->Services
and found out Postgres' service name which is
postgresql-x64-13 - PostgreSQL Server 13
. When I try
runas /user:Administrator cmd
and then
net start postgresql-x64-13 - PostgreSQL Server 13
I get
System Error 5. Access Denied.
This is driving me nuts...
–
–
As Rob pointed out (and as I assumed): Postgres database server has not been started (yet).
To start it manually type services.msc
in i.e. 'PowerShell`, let the Pop Up open and search for Postgres there. Then, start/top the service there. Make sure to restart pgAdmin after doing this...