pgadmin problem
pgadmin problem
От:
mmd@teledavis.com
Дата:
I want to use pgadmin to set up some tables, rather than do all the
psql statements from the terminal.
When I try to add a server, though, pgadmin fails to connect, and asks
whether the server is accepting TCP/IP connections on the default
port, and whether localhost is the correct servername.
I assume that both of these ARE set to the defaults, because if I
simply type
$ psql contacts
I go right into psql, where I am allowed to make and alter tables.
Is there something along the lines of a "psql -v" that would tell
me what the server calls itself, and what ports it's listening on (oh,
and whether it's allowing TCP/IP connections)?
If not, is there better help on this pgadmin3 dialogue somewhere? The
stock documentation is very thin.
Best,
Matt
--
Matthew M Davis
Re: pgadmin problem
От:
Doug McNaught <doug@mcnaught.org>
Дата:
mmd@teledavis.com writes: > I want to use pgadmin to set up some tables, rather than do all the > psql statements from the terminal. > > When I try to add a server, though, pgadmin fails to connect, and asks > whether the server is accepting TCP/IP connections on the default > port, and whether localhost is the correct servername. > > I assume that both of these ARE set to the defaults, because if I > simply type > > $ psql contacts > > I go right into psql, where I am allowed to make and alter tables. The server doesn't use TCP/IP by default. You can change this by editing the postgresql.conf file in the server's data directory (the location of which varies depending on how PG was installed) and setting 'tcpip_socket' to 'true', then restarting the server. You may also need to edit pg_hba.conf, depending on whether you're connecting from the local machine and how you have your databases set up. -Doug
Re: pgadmin problem
От:
Oliver Elphick <olly@lfix.co.uk>
Дата:
On Fri, 2004-07-23 at 13:58, mmd@teledavis.com wrote:
> I want to use pgadmin to set up some tables, rather than do all the
> psql statements from the terminal.
>
> When I try to add a server, though, pgadmin fails to connect, and asks
> whether the server is accepting TCP/IP connections on the default
> port, and whether localhost is the correct servername.
>
> I assume that both of these ARE set to the defaults, because if I
> simply type
>
> $ psql contacts
>
> I go right into psql, where I am allowed to make and alter tables.
In that case you are not using TCP/IP to localhost, but a Unix socket.
Try "psql -h localhost contacts" to see the difference.
Edit $PGDATA/pg_hba.conf to change the settings (and then signal the
postmaster or restart it).
--
Oliver Elphick olly@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
"Be not deceived; God is not mocked; for whatsoever a
man soweth, that shall he also reap."
Galatians 6:7