Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problemi di connessione con postgresql[RISOLTO]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
abaddon83
Guru
Guru


Joined: 17 Jan 2004
Posts: 494

PostPosted: Tue May 18, 2004 8:58 pm    Post subject: problemi di connessione con postgresql[RISOLTO] Reply with quote

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
View user's profile Send private message
xchris
Advocate
Advocate


Joined: 10 Jul 2003
Posts: 2824

PostPosted: Tue May 18, 2004 10:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
STICazzi-DoC
n00b
n00b


Joined: 19 May 2004
Posts: 6

PostPosted: Wed May 19, 2004 6:58 am    Post subject: Reply with quote

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
View user's profile Send private message
abaddon83
Guru
Guru


Joined: 17 Jan 2004
Posts: 494

PostPosted: Wed May 19, 2004 7:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum