0

enter image description hereI am trying to install PostgreSQL but unable to install in my windows Machine. The following Error Throwing.

psql: could not connect server: connection refused .

installing postgreSQL

Rajesh
  • 11
  • 4

1 Answers1

1
  1. You do not use Postgres default Port 5432 ( 1433 is for MS SQL Server) .

  2. It is a daemon , so you might need to reboot/start the service /using the command line or the windows services panel

There is a detailed post on that already,

GUI ( Windows installer )

The GUI way if you used the Windows installer using services.msc applet looks like this: start postgres via services.msc

You might use CLI as well

Console Example 1:

net start postgres_service_name

Console Example 2:

  • locate your data folder
  • locate the installation folder
  • cd to install folder , start usign pg_ctl
  • you might have to use a supervisor command line ( right-click .. run as administrator on the icon or executable of cmd ) for that
cd C:\Users\Username\Documents\postgresql-9.5.21-1-windows-x64-binaries (1)\pgsql\bin
pg_ctl -D "C:\usr\local\pgsql\data" start

The result on console looks like this: pg_ctl cli start

Bencho Naut
  • 348
  • 1
  • 6