Обсуждение: Connecting to the database via TCP/IP

Поиск
Список
Период
Сортировка

Connecting to the database via TCP/IP

От
Guillaume Yziquel
Дата:
Hello all.

I'm using postgresql 7.4 on debian etch. I'm trying to get my database
working over TCP/IP connection.

I therefore have set

> tcpip_socket=true

in my /etc/postgresql/7.4/main/postgresql.conf file, but I cannot seem
to connect via TCP/IP.

I also get:

> yziquel@seldon:~$ telnet 127.0.0.1 5432
> Trying 127.0.0.1...
> Connected to 127.0.0.1.
> Escape character is '^]'.

It's then waiting for input, but no matter what I type, I get:

> Connection closed by foreign host.

What's going wrong here?

Guillaume.

Re: Connecting to the database via TCP/IP

От
"Andrej Ricnik-Bay"
Дата:
On 6/17/07, Guillaume Yziquel <guillaume.yziquel@free.fr> wrote:

> > yziquel@seldon:~$ telnet 127.0.0.1 5432
> > Trying 127.0.0.1...
> > Connected to 127.0.0.1.
> > Escape character is '^]'.
>
> It's then waiting for input, but no matter what I type, I get:
>
> > Connection closed by foreign host.
>
> What's going wrong here?
My wild guess would be that psql is smarter than the
dumb telnet ... you'd get similar results from an LDAP
server ...

Try using psql (the tool that's meant for this kind of
activity).

> Guillaume.
-- Cheers,
   Andrej