Обсуждение: connecting pgadmin3 to the postgres

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

connecting pgadmin3 to the postgres

От
"Kevin B."
Дата:
Date:       Fri, November 12, 2004 10:33 am
To:       pgadmin-support@postgresql.orgc
Priority:       Normal
Options:       View Full Header |  View Printable Version

Hi,

I'm trying connect pgadmin3 to the postgres 7.4.2 server running on the
same computer but I am unable to do it. I am using the default fc2 install
of postgresql.  The postgres service is running and from the terminal I am
able to connect via psql.
------------------------------------
[root@localhost root]# su - postgres
-bash-2.05b$ psql test
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms      \h for help with SQL commands      \? for help on internal slash commands
    \g or terminate with semicolon to execute query      \q to quit
 

test=# exit
test-# \q
-bash-2.05b$ exit
logout
------------------------------------

I started pgadmin3 from a root terminal and into the "Connected to a
server"  dailog I entered:
Description: x
Server: localhost
Port: 5432
Inital database: test
Username:postgres
Trusted: UNchecked
Password: (left it blank)

Upon clicking the OK button I got:
An error has occured:
Error connecting to the server: FATAL: no pg_hba.conf entry for host
"127.0.0.1", user "postgres", database "test", SSL off

But in the pg_hba.conf file there is this line:
local  all    all             ident   sameuser
which I thought would allow any type of connection to the postgres server
from the local machine.

Thanks for any help.
-Kevin







Re: connecting pgadmin3 to the postgres

От
"Kevin B."
Дата:
> But in the pg_hba.conf file there is this line:
> local  all    all             ident   sameuser
> which I thought would allow any type of connection to the postgres server
> from the local machine.
>

Ok, I changed the above line to:

local  all    all          trust

and that did not work but this line did:

host    all         all         127.0.0.1         255.255.255.255   true

-------------------------

I can see, now, why "local all all ident  sameuser" wouldn't work.
But why doesn't "local all all trust" work when
"host all all 127.0.0.1 255.255.255.255  true" does?

Thanks,
Kevin


Re: connecting pgadmin3 to the postgres

От
Cheetah
Дата:
On Fri, 12 Nov 2004 11:22:53 -0500 (EST), Kevin B. <db@ke5in.com> wrote:
> 
> I can see, now, why "local all all ident  sameuser" wouldn't work.
> But why doesn't "local all all trust" work when
> "host all all 127.0.0.1 255.255.255.255  true" does?

Because "local" refers to unix domain socket connections, while "host"
refers to inet domain socket connections.  Connecting to localhost
(127.0.0.1) is an inet socket connection, even though it's to the
local system.

--    -- Cheetah