pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Remote connection through ODBC
3+ messages / 2 participants
[nested] [flat]

* Remote connection through ODBC
@ 2013-07-10 14:47  HAAS Benjamin <Benjamin.HAAS@cstb.fr>
  0 siblings, 1 reply; 3+ messages in thread

From: HAAS Benjamin @ 2013-07-10 14:47 UTC (permalink / raw)
  To: pgsql-odbc

Dear all

I am a newbie using PostgreSQL, for instance through ODBC. I have troubles with the remote connection through ODBC. I have a PostgreSQL 9.1 instance on an Ubuntu 13.04, a client on a Centos 6.4.

ODBC driver on the CentOs machine is the standard one shipped in the CentOS repo, version 08.04.0200.

I have no problem to connect locally to the PostgreSQL from the Ubuntu machine. However, when I try an isql query from the Centos client, i get
[ISQL]ERROR: Could not SQLConnect.

Note that the file postgresql.conf contains a listen_adresses='*', and pg_hba.conf contains the line
host all all 0.0.0.0/0 md5

On the other hand, I have no problem to connect through pgadmin3 from the CentOS machine. As well with the psql commant : it works.

At the end, I am interested in querying the database from a C code : of course it does not work

File obc.ini contains correct credentials (and a connection to a MySQL server works)

Any help would be much appreciated !

Benjamin.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Remote connection through ODBC
@ 2013-07-10 23:39  Inoue, Hiroshi <inoue@tpf.co.jp>
  parent: HAAS Benjamin <Benjamin.HAAS@cstb.fr>
  0 siblings, 1 reply; 3+ messages in thread

From: Inoue, Hiroshi @ 2013-07-10 23:39 UTC (permalink / raw)
  To: HAAS Benjamin <Benjamin.HAAS@cstb.fr>; +Cc: pgsql-odbc

Hi,

(2013/07/10 23:47), HAAS Benjamin wrote:
> Dear all
>
> I am a newbie using PostgreSQL, for instance through ODBC. I have
> troubles with the remote connection through ODBC. I have a PostgreSQL
> 9.1 instance on an Ubuntu 13.04, a client on a Centos 6.4.
>
> ODBC driver on the CentOs machine is the standard one shipped in the
> CentOS repo, version 08.04.0200.
>
> I have no problem to connect locally to the PostgreSQL from the Ubuntu
> machine. However, when I try an isql query from the Centos client, i get
> [ISQL]ERROR: Could not SQLConnect.
>
> Note that the file postgresql.conf contains a listen_adresses='*', and
> pg_hba.conf contains the line
> host all all 0.0.0.0/0 md5
>
> On the other hand, I have no problem to connect through pgadmin3 from
> the CentOS machine. As well with the psql commant : it works.
>
> At the end, I am interested in querying the database from a C code : of
> course it does not work
>
> File obc.ini contains correct credentials (and a connection to a MySQL
> server works)

Could you please show us your odbc.ini?

regards,
Hiroshi Inouw




-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Remote connection through ODBC
@ 2013-07-11 07:53  HAAS Benjamin <Benjamin.HAAS@cstb.fr>
  parent: Inoue, Hiroshi <inoue@tpf.co.jp>
  0 siblings, 0 replies; 3+ messages in thread

From: HAAS Benjamin @ 2013-07-11 07:53 UTC (permalink / raw)
  To: Inoue, Hiroshi <inoue@tpf.co.jp>; +Cc: pgsql-odbc

Hi, 

Problem solved late yesterday, the problem was indeed in odbc.ini.  The keyword for the server name, user name and the port are not the same as for MySQL. I was not aware of that. Sorry for polluting your mail boxes with such a trivial problem ! 

Best. 



-----Message d'origine-----
De : Inoue, Hiroshi [mailto:inoue@tpf.co.jp] 
Envoyé : jeudi 11 juillet 2013 01:40
À : HAAS Benjamin
Cc : pgsql-odbc@postgresql.org
Objet : Re: [ODBC] Remote connection through ODBC

Hi,

(2013/07/10 23:47), HAAS Benjamin wrote:
> Dear all
>
> I am a newbie using PostgreSQL, for instance through ODBC. I have 
> troubles with the remote connection through ODBC. I have a PostgreSQL
> 9.1 instance on an Ubuntu 13.04, a client on a Centos 6.4.
>
> ODBC driver on the CentOs machine is the standard one shipped in the 
> CentOS repo, version 08.04.0200.
>
> I have no problem to connect locally to the PostgreSQL from the Ubuntu 
> machine. However, when I try an isql query from the Centos client, i 
> get
> [ISQL]ERROR: Could not SQLConnect.
>
> Note that the file postgresql.conf contains a listen_adresses='*', and 
> pg_hba.conf contains the line host all all 0.0.0.0/0 md5
>
> On the other hand, I have no problem to connect through pgadmin3 from 
> the CentOS machine. As well with the psql commant : it works.
>
> At the end, I am interested in querying the database from a C code : 
> of course it does not work
>
> File obc.ini contains correct credentials (and a connection to a MySQL 
> server works)

Could you please show us your odbc.ini?

regards,
Hiroshi Inouw




-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2013-07-11 07:53 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-07-10 14:47 Remote connection through ODBC HAAS Benjamin <Benjamin.HAAS@cstb.fr>
2013-07-10 23:39 ` Inoue, Hiroshi <inoue@tpf.co.jp>
2013-07-11 07:53   ` HAAS Benjamin <Benjamin.HAAS@cstb.fr>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox