Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client
От | Nick Gorham |
---|---|
Тема | Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client |
Дата | |
Msg-id | 55A90E6A.4030802@lurcher.org обсуждение исходный текст |
Ответ на | Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client ("Stefan Viljoen" <viljoens@verishare.co.za>) |
Ответы |
Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client
|
Список | 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@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
В списке pgsql-odbc по дате отправления: