Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
viva, tenho o postgresql instalo numa maquina em ubunto a funcionar tudo na perfeição, agora precisa de ligar um pc com windows vista na mesma rede a essa bd, tenho tentado com pgadmin3 e putty e nada, da-me sempre erro de conexao.
Alguem me da uma ajuda nisto?
Obrigado
Ola, com que método você ta tentando realizar essa conexão ?
Segue alguns exemplos de como configurar o mesmo.
Allow any user on the local system to connect to any database under
any user name using Unix-domain sockets (the default for local
connections).
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trustThe same using local loopback TCP/IP connections.
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
host all all 127.0.0.1 255.255.255.255 trustAllow any user from any host with IP address 192.168.93.x to connect
to database "template1" as the same user name that ident reports for
the connection (typically the Unix user name).
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
host template1 all 192.168.93.0 255.255.255.0 ident sameuserAllow a user from host 192.168.12.10 to connect to database
"template1" if the user's password is correctly supplied.
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
host template1 all 192.168.12.10 255.255.255.255 md5In the absence of preceding "host" lines, these two lines will
reject all connection from 192.168.54.1 (since that entry will be
matched first), but allow Kerberos V connections from anywhere else
on the Internet. The zero mask means that no bits of the host IP
address are considered so it matches any host.
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
host all all 192.168.54.1 255.255.255.255 reject host all all 0.0.0.0 0.0.0.0 krb5Allow users from 192.168.x.x hosts to connect to any database, if
they pass the ident check. If, for example, ident says the user is
"bryanh" and he requests to connect as PostgreSQL user "guest1", the
connection is allowed if there is an entry in pg_ident.conf for map
"omicron" that says "bryanh" is allowed to connect as "guest1".
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
host all all 192.168.0.0 255.255.0.0 ident omicronIf these are the only three lines for local connections, they will
allow local users to connect only to their own databases (databases
with the same name as their user name) except for administrators and
members of group "support" who may connect to all databases. The file
$PGDATA/admins contains a list of user names. Passwords are required in
all cases.
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local sameuser all md5 local all @admins md5 local all +support md5The last two lines above can be combined into a single line:
local all @admins,+support md5The database column can also use lists and file names, but not groups:
local db1,db2,@demodbs all md5Fonte (Inglês)
Fonte (Português)