From: | Nick Gorham <nick(at)lurcher(dot)org> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client |
Date: | 2015-07-17 14:17:14 |
Message-ID: | 55A90E6A.4030802@lurcher.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-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(at)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(at)jhbasterisk pg_log]# service postgresql-9.4 restart
> Stopping postgresql-9.4 service: [ OK ]
> Starting postgresql-9.4 service: [ OK ]
> [root(at)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
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Viljoen | 2015-07-17 14:27:25 | Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client |
Previous Message | Stefan Viljoen | 2015-07-17 14:07:14 | Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client |