Thread: can't connect using the -host option

can't connect using the -host option

From
"Robert Wagner"
Date:
Dear All,

Strange behaviour....

I'm working in a TCL environment and use pg_connect to connect to pgsql
databases.  I want to move a suite of apps into production testing.  I need
to be able to run an app on any workstation, and connect to a database on
any workstation on our tcp-ip network.  For example, the development
database might be on one host, but the production and QA databases on
another.  And I might want to test any database interactively...

However, even if the database is ON my current workstation, I can ONLY
connnect with the command, "pg_connect dbName".  If I use the -host option,
I get the error:

Error: Connection to database failed
User Authentication failed

... strange indeed.  Suggestions on making this work?

Also, when I started up an identical database on a different workstation,
even with a different port, it caused my original database on my home
server to cease accepting connections.

All suggestions are welcome.  If I ask for help from Unix Admin, they'll
tell us that we have to migrate to one of their "supported" databases, such
as Sybase... something I 'd like to avoid!!

Cheers
Rob



Re: can't connect using the -host option

From
Charles Tassell
Date:
The host option tells your program to connect to the PG server via TCP/IP,
so you have to start your server with the -i switch, so it will accept
TCP/IP connections.  If you are already using the -i switch, you should
check your pg_hba.conf file (it's in the PGDATA directory I believe) to
make sure that the machine you are connecting from has permissions to
access the database you are trying to connect to.


At 03:02 PM 4/13/00, Robert Wagner wrote:
>Dear All,
>
>Strange behaviour....
>
>I'm working in a TCL environment and use pg_connect to connect to pgsql
>databases.  I want to move a suite of apps into production testing.  I need
>to be able to run an app on any workstation, and connect to a database on
>any workstation on our tcp-ip network.  For example, the development
>database might be on one host, but the production and QA databases on
>another.  And I might want to test any database interactively...
>
>However, even if the database is ON my current workstation, I can ONLY
>connnect with the command, "pg_connect dbName".  If I use the -host option,
>I get the error:
>
>Error: Connection to database failed
>User Authentication failed
>
>... strange indeed.  Suggestions on making this work?
>
>Also, when I started up an identical database on a different workstation,
>even with a different port, it caused my original database on my home
>server to cease accepting connections.
>
>All suggestions are welcome.  If I ask for help from Unix Admin, they'll
>tell us that we have to migrate to one of their "supported" databases, such
>as Sybase... something I 'd like to avoid!!
>
>Cheers
>Rob