PostgreSQL设置: postgresql.conf -> 允许所有传入连接(*)并将ssl设置为TRUE pg_hba.conf -> 经过多次更改,我终于找到了似乎可以工作的设置:
IP4
host all all 0.0.0.0/0 trust
hostssl all all 0.0.0.0/0 trust
host all all 192.168.x.x/32 trust
hostssl all all 192.168.x.x/32 trust
我尝试过:
Made restart of my postgres server on the virtual machine.
Then i went to my host machine (Snow Leopard), build a ssh connection to the virtualbox (ubuntu) and it's working.
ping my guest machine on port 5432 also works.
Open pgadmin on my host machine (Snow Leopard) -> added server 192.68.56.1 and database
pluto
, userpippo
. The connection worked and i see the DB.Tried open TERMINAL in Snow Leopard and executed following cmd:
psql -h 192.168.56.1 -U pippo -d pluto
with ERROR:
psql: FATAL: no pg_hba.conf entry for host "192.168.56.1", user "pippo", database "pluto", SSL off
我做错了什么?