Solved: Cannot connect Postgre in VM from host
Used vagrant for setting up the VM, so set private network and port forward in vagrant file as below - migration.vm.network "private_network", ip: "192.168.33.10" migration.vm.network "forwarded_port" ,guest:5432 , host:15432 1. Use telnet localhost 15432 to see if the port is open (Host) Still can not connect to PostgresSql running in VM :( Then 2. Edit postgresql.conf (Guest) #------------------------------------------------------------------------------ # CONNECTIONS AND AUTHENTICATION #------------------------------------------------------------------------------ # - Connection Settings - listen_addresses = '*' 3. Add following in pg_hba.conf # IPv4 local connections: host all ...