I am trying to connect to Postgresql using the PGAdmin III client on Windows 8.1. Postgresql is installed on a local copy of Vagrant (Ubuntu 14.04) on my Windows computer. It works and works on Vagrant:
LISTEN
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 814/postgres
TESTED USER / PASS / LOCAL CONNECTION
I can access Postgresql locally in Vagrant via SSH on Windows:
vagrant@precise32:/etc/postgresql/9.1/main$ psql -h localhost testdb myuser
Password for user myuser:
psql (9.1.15)
SSL connection (<removed)
Type "help" for help.
testdb=> \quit
pg_hba.conf
I added this to my pg_hba.conf file:
host all all 127.0.0.1/32 md5
host all all <my IP> md5
VAGRANT CONFIG
My Vagrant configuration is configured to send to address 5432:
config.vm.network "forwarded_port", guest: 5432, host: 15432
postgresql.conf
And my postgresql.conf file is configured to listen on all IP addresses:
#listen_addresses = '*'
PGADMIN ERROR
, , PGAdmin , , , , - ?:
An error has occurred:
Error connecting to the server: server closed the connection unexpectedly
This probably means the server terminated abnormally before or while processing the request.
PGADMIN
Host: localhost
Port: 15432
Service: <blank>
Maintenance DB: postgres
Username: Myuser (verified)
Password: ****** (verified)
Store password:
Colour: <blank>
Group: Servers