View previous topic :: View next topic |
Author |
Message |
abaddon83 Guru
Joined: 17 Jan 2004 Posts: 494
|
Posted: Tue May 18, 2004 8:58 pm Post subject: problemi di connessione con postgresql[RISOLTO] |
|
|
ciao a tutti, sto sviluppando un progetto in postresql, solo che è la prima volta che lo utilizzo (fino ad ora ho usato sempre mysql)
il servizio parte, ma riesco ad accedervi solo tramite phppgadmin, sia la mia applicazione in java che il tool pgaccess dicono che non possono accedere...
ecco per esempio l'errore di java:
SQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
per ogni evvenienza il firewall è completamente abbassato, ma non è cambiato nulla.
Probabilmente è un file di conf da sistemare, ma non saprei dove mettere le mani.
in giro di documentazione ce ne è pochina... o comunque non trovo cio' che cerco.
grazie ancora ciao _________________ Abaddon's House
Jabber account: abaddon@jabber.linux.it
Last edited by abaddon83 on Wed May 19, 2004 7:14 pm; edited 1 time in total |
|
Back to top |
|
|
xchris Advocate
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Tue May 18, 2004 10:44 pm Post subject: |
|
|
vi /etc/conf.d/postgresql
Code: |
# PostgreSQL's Database Directory
PGDATA=/var/lib/postgresql/data
# Logfile path: (NOTE: This must be uid/gid owned by the value of $PGUSER!)
PGLOG=/var/lib/postgresql/data/postgresql.log
# Run the PostgreSQL user as:
PGUSER=postgres
# Extra options to run postmaster with.
# If you want to enable TCP/IP for PostgreSQL, add -i to the following:
PGOPTS="-N 1024 -B 2048 -i"
|
ciao _________________ while True:Gentoo() |
|
Back to top |
|
|
STICazzi-DoC n00b
Joined: 19 May 2004 Posts: 6
|
Posted: Wed May 19, 2004 6:58 am Post subject: |
|
|
Devi avviare Pg con l' opzione -i e poi modificare pg_hba.conf per accettare gli ip di rete con una riga tipo questa:
host all all 192.168.0.0 255.255.0.0
Ciauz |
|
Back to top |
|
|
abaddon83 Guru
Joined: 17 Jan 2004 Posts: 494
|
Posted: Wed May 19, 2004 7:13 pm Post subject: |
|
|
risolto thx
c'è un altra cosa da sistemare che nona vete detto^^
in
/var/lib/postgresql/data/postgresql.conf
Code: |
#---------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#---------------------------------------------------------------------------
# - Connection Settings -
tcpip_socket = true <---- è da decommentare e settare true
|
grazie a tutti comunque^^ _________________ Abaddon's House
Jabber account: abaddon@jabber.linux.it |
|
Back to top |
|
|
|