pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Gorham <nick@lurcher.org>
To: pgsql-odbc@postgresql.org
Subject: Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client
Date: Fri, 17 Jul 2015 15:17:14 +0100
Message-ID: <55A90E6A.4030802@lurcher.org> (raw)
In-Reply-To: <003001d0c099$e21a7b60$a64f7220$@verishare.co.za>
References: <000b01d0c066$c58f3b80$50adb280$@verishare.co.za>
	<55A8BF02.4090001@lurcher.org>
	<002701d0c07f$bd09f3b0$371ddb10$@verishare.co.za>
	<55A8E0B8.3070107@lurcher.org>
	<002e01d0c088$c6b57390$54205ab0$@verishare.co.za>
	<55A8F948.9040407@lurcher.org>
	<002f01d0c090$da03cc50$8e0b64f0$@verishare.co.za>
	<55A905FA.2080701@aklaver.com>
	<003001d0c099$e21a7b60$a64f7220$@verishare.co.za>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

On 17/07/15 15:07, Stefan Viljoen wrote:
> Hi Adrian
>
> Thanks for replying!
>
>> So what does your odbcinst.ini file look like?
> Here is my odbcinst.ini file, as automatically created when installing the
> postgresql-odbc package in Centos 6.5 via YUM:
>
> ---
> # Example driver definitions
>
> # Driver from the postgresql-odbc package
> # Setup from the unixODBC package
> [PostgreSQL]
> Description     = ODBC for PostgreSQL
> Driver          = /usr/pgsql-9.4/lib/psqlodbc.so
> Setup           = /usr/lib/libodbcpsqlS.so
> Driver64        = /usr/pgsql-9.4/lib/psqlodbc.so
> Setup64         = /usr/lib64/libodbcpsqlS.so
> FileUsage       = 1
>
> # Driver from the mysql-connector-odbc package
> # Setup from the unixODBC package
> [MySQL]
> Description     = ODBC for MySQL
> Driver          = /usr/lib/libmyodbc5.so
> Setup           = /usr/lib/libodbcmyS.so
> Driver64        = /usr/lib64/libmyodbc5.so
> Setup64         = /usr/lib64/libodbcmyS.so
> FileUsage       = 1
> ---
>
>> What happens if you temporarily change the authentication to trust in
> pg_hba.conf and after reloading the Postgres server try to connect?
>
> [root@jhbasterisk pg_log]# vim ../pg_hba.conf
>
> Change to read like this:
>
> ---
> local   all             all                                     trust
> host    all             all             127.0.0.1/32            trust
> host    all             all             ::1/128                 trust
> ---
>
> [root@jhbasterisk pg_log]# service postgresql-9.4 restart
> Stopping postgresql-9.4 service:                           [  OK  ]
> Starting postgresql-9.4 service:                           [  OK  ]
> [root@jhbasterisk pg_log]# isql -vvvvvv pgdb-cdr dbuser password
> [S1000][unixODBC]The database does not exist on the server
> or user authentication failed.
> [ISQL]ERROR: Could not SQLConnect

Getting confused now. The above leads me to believe you should have

Database                = asteriskcdrcdrdb

in the odbc.ini entry and connect as

isql -v pgdb-cdr asteriskcdruser whateverthepasswordis

I was assuming you were replacing dbuser, dbname and password with the real ones for your situation.

-- 
Nick


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



view thread (39+ messages)  latest in thread

Message-ID: <55A90E6A.4030802@lurcher.org>
Permalink:  ../55A90E6A.4030802@lurcher.org/
Also on:    postgresql.org/message-id/55A90E6A.4030802@lurcher.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: nick@lurcher.org
  Subject: Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client
  In-Reply-To: <55A90E6A.4030802@lurcher.org>
  References: <000b01d0c066$c58f3b80$50adb280$@verishare.co.za> <55A8BF02.4090001@lurcher.org> <002701d0c07f$bd09f3b0$371ddb10$@verishare.co.za> <55A8E0B8.3070107@lurcher.org> <002e01d0c088$c6b57390$54205ab0$@verishare.co.za> <55A8F948.9040407@lurcher.org> <002f01d0c090$da03cc50$8e0b64f0$@verishare.co.za> <55A905FA.2080701@aklaver.com> <003001d0c099$e21a7b60$a64f7220$@verishare.co.za> <55A90E6A.4030802@lurcher.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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