无法连接到VirtualBox客户端上的PostgreSQL
当我尝试从主机系统上的PostgreSQL客户端连接到VirtualBox客户系统上的PostgreSQL服务器时,出现“连接尝试失败”消息。 主机系统是Windows XP。 我正在运行VirtualBox 3.1.2。 客户系统是Ubuntu 9.10 Karmic Koala和PostgreSQL 8.4。 我已经在VirtualBox中转发了端口5432,如手册和本文中所述。 当我运行vboxmanage getextradata vmname enumerate ,我得到这些条目(除其他外): Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/pgsql/GuestPort, Value: 5432 Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/pgsql/HostPort, Value: 5432 Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/pgsql/Protocol, Value: TCP 我使用这些条目在/etc/postgresql/8.4/main/pg_hba.conf中configuration了PostgreSQL安全性: # IPv4 local connections: host all all 127.0.0.1/32 md5 host all all 192.168.1.0/24 md5 host all all 10.0.2.2/32 md5 然后我用sudo /etc/init.d/postgresql-8.4 reload加载PostgreSQL。 仅出于诊断目的 ,我禁用了我的Windows防火墙和我的Ubuntu防火墙( sudo ufw […]