Обсуждение: can only connect to localhost is postgresql

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

can only connect to localhost is postgresql

От
Art Fore
Дата:
When connecting to postgresql database via ODBC, I can only connect via
localhost, I cannot connect via the computer name. I can ping the
computer name and get a return. Postgres is started with the -i option.
Why can I not connect via computer name?

Art



Re: can only connect to localhost is postgresql

От
Rob Klaus
Дата:
Have you added the appropriate host to the pg_hba.conf file?

At 09:40 AM 1/31/2003 -0800, Art Fore wrote:
When connecting to postgresql database via ODBC, I can only connect via localhost, I cannot connect via the computer name. I can ping the computer name and get a return. Postgres is started with the -i option.
Why can I not connect via computer name?

Art



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rob Klaus
Database Analyst
Unique Management Services Inc.
119 East Maple Street
Jeffersonville IN 47130
Phone: 812-285-0886
1-800-879-5453
Fax: 812-285-0895

http://www.unique-mgmt.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Re: can only connect to localhost is postgresql

От
Reshat Sabiq
Дата:
I think in pg_hba you'd need to put the IP, rather than the computer name.

r.

Rob Klaus wrote:
Have you added the appropriate host to the pg_hba.conf file?

At 09:40 AM 1/31/2003 -0800, Art Fore wrote:
When connecting to postgresql database via ODBC, I can only connect via localhost, I cannot connect via the computer name. I can ping the computer name and get a return. Postgres is started with the -i option.
Why can I not connect via computer name?

Art



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rob Klaus
Database Analyst
Unique Management Services Inc.
119 East Maple Street
Jeffersonville IN 47130
Phone: 812-285-0886
1-800-879-5453
Fax: 812-285-0895

http://www.unique-mgmt.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Re: can only connect to localhost is postgresql

От
"Reshat Sabiq"
Дата:

I have a question:

Is it a legit thing to have 2 connection modes for the same host:

 

local        all                                           ident sameuser

local        all                                           ident newmode

Thanks,
r.

-----Original Message-----
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Reshat Sabiq
Sent: Friday, January 31, 2003 2:19 PM
To: Rob Klaus
Cc: afore@sonic.net;
pgsql-novice@postgresql.org
Subject: Re: [NOVICE] can only connect to localhost is postgresql

 

I think in pg_hba you'd need to put the IP, rather than the computer name.

r.

Rob Klaus wrote:

Have you added the appropriate host to the pg_hba.conf file?

At 09:40 AM 1/31/2003 -0800, Art Fore wrote:

When connecting to postgresql database via ODBC, I can only connect via localhost, I cannot connect via the computer name. I can ping the computer name and get a return. Postgres is started with the -i option.
Why can I not connect via computer name?

Art



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rob Klaus
Database Analyst
Unique Management Services Inc.
119 East Maple Street
Jeffersonville IN 47130
Phone: 812-285-0886
1-800-879-5453
Fax: 812-285-0895

http://www.unique-mgmt.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Re: can only connect to localhost is postgresql

От
Bruno Wolff III
Дата:
On Fri, Jan 31, 2003 at 18:17:07 -0500,
  Reshat Sabiq <sabiq@purdue.edu> wrote:
> I have a question:
> Is it a legit thing to have 2 connection modes for the same host:
>
> local        all                                           ident
> sameuser
> local        all                                           ident newmode

This won't work as all connections that would match the second rule,
match the first rule, so the second rule will never be used.
In 7.3 you can write authentication rules that match connection method,
database and user, which might allow you to do what you want.

Re: can only connect to localhost is postgresql

От
"Reshat Sabiq"
Дата:
> I have a question:
> Is it a legit thing to have 2 connection modes for the same host:
>
> local        all                                           ident
sameuser
> local        all                                           ident
newmode

This won't work as all connections that would match the second rule,
match the first rule, so the second rule will never be used.
In 7.3 you can write authentication rules that match connection method,
database and user, which might allow you to do what you want.

---------------
Thanks,

I wasn't aware that 7.3.1 also has better authentication support. At
home at have it, but for the site. 7.3 appears to be a significant step
forward.

It appears that an equivalent of the 2 lines above will work just fine
in 7.3. I'll try to test that next week.

Sincerely,
r.