Bonjour,
Je viens d'installer PostGres sur une mandriva 2006
J'utilise un petit prog en Java pour me connecter en local avec le code :
tout fonctionne impec
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 String nomDriver = "org.postgresql.Driver"; String url = "jdbc:postgresql://localhost/postgres"; String login = "xxx"; String password = "yyy"; Connection connection = null; try{ Class.forName(nomDriver); connection = DriverManager.getConnection(url, login, password); } catch(SQLException sqle){ ...
Par contre lorsque je lance le même prog depuis une machine distante (en win2000), j'ai le message d'erreur suivant :
Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Bon, j'ai bien sûr remplacé le localhost par l'IP de la machine mais rien à faire.
Quelqu'un peut me donner un coup de pouce ?
Laurent
PS : J'ai rajouté dans :
- le postgresql.conf :
ssl=true et tcpip_socket=true
- pg_hba.conf :
# IPv4 local connections
host all all 192.168.1.1 255.255.255.0 trust
Mais ca ne change rien![]()
Partager