Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEUZs-0000UP-Dz for pgsql-odbc@arkaria.postgresql.org; Wed, 07 Dec 2016 05:15:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cEUZr-00061s-Ms for pgsql-odbc@arkaria.postgresql.org; Wed, 07 Dec 2016 05:15:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cEUZU-0005XW-Ri for pgsql-odbc@postgresql.org; Wed, 07 Dec 2016 05:15:13 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cEUZQ-0005yH-F9 for pgsql-odbc@postgresql.org; Wed, 07 Dec 2016 05:15:12 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1295D20993; Wed, 7 Dec 2016 00:15:06 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Wed, 07 Dec 2016 00:15:06 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=AO0XnF7ZuxTehYU lSBWpBh8rAgQ=; b=mexA7EPfZGiaW3cBwsRHpCW0FxCKFb7Rn3qCmZF03N6/cFP qlE3kMBXJEWcCO5f4L95sIaMw9qtrAVzXKy4j6039EC1uqNkDdME6o5b9v3VhPvN eaYIRpZ65R2jFz9PtJWjtFby9VOtF3QTKqJtC15AGyZBVG5yGn5b3Bl/34kU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=AO0XnF7ZuxTehYUlSBWpBh8rAgQ=; b=bfCEC8QDPi1c/7Ow72Vg jqOlBWGjMsl06am+4T6uRsfaRlUrqgE3m0oqV2u5TgNcFQn5n1uZBh7kSAU96xG7 4Qk50wnFV8RJrf4tng+m4DLHN3uABf8Qmm1Jbrpz3urx6nVGg8t76sV5qWHcRFjh GGqmdUqV3ad3G/rmCRzaVE0= X-ME-Sender: X-Sasl-enc: XFQiRt7hr+9w5mAdZfi6mnwPK7l/Qm1tc+9nkO25n07O 1481087705 Received: from [192.168.1.11] (174-21-234-69.tukw.qwest.net [174.21.234.69]) by mail.messagingengine.com (Postfix) with ESMTPA id 4F898247EF; Wed, 7 Dec 2016 00:15:05 -0500 (EST) Subject: Re: Connection failed [was: Re: Distribution package for OSX] To: Igor Korot References: Cc: Michael Paquier , Tom Lane , PostgreSQL ODBC list From: Adrian Klaver Message-ID: <4600a871-de4f-e7a2-68ad-2827610fac08@aklaver.com> Date: Tue, 6 Dec 2016 21:15:04 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 12/06/2016 08:48 PM, Igor Korot wrote: > Hi, guys, > So I moved a little further with this. > > First of all I found out that default OSX install comes with client tools > pre-installed. No server. > > So I installed the PostgreSQL server on my Mac. > > Next is trying to connect with iODBC. > > But first I tried to open SQL Shell (psql). Here is the session log: > > [code] > Last login: Tue Dec 6 23:11:08 on ttys001 > /Library/PostgreSQL/9.1/scripts/runpsql.sh; exit > Igors-MacBook-Air:~ igorkorot$ /Library/PostgreSQL/9.1/scripts/runpsql.sh; exit > Server [localhost]: > Database [postgres]: > Port [5432]: > Username [postgres]: > Password for user postgres: > psql (9.1.24) > Type "help" for help. > > postgres=# \q > logout > > [Process completed] > [/code] > > So I presume that the server is running. > > Next I tried to configure ODBC. Since there is no psqlODBCS.so to > setup the connection, > I tried to do it manually. > > Here are the files: > > [code] > Igors-MacBook-Air:~ igorkorot$ cat .odbcinst.ini > [ODBC Drivers] > MySQL ODBC 5.3 Unicode Driver = Installed > MySQL ODBC 5.3 ANSI Driver = Installed > PostgreSQL Unicode Driver = Installed > > [ODBC Connection Pooling] > PerfMon = 0 > Retry Wait = > > [MySQL ODBC 5.3 Unicode Driver] > Driver = /usr/local/lib/libmyodbc5w.so > > [MySQL ODBC 5.3 ANSI Driver] > Driver = /usr/local/lib/libmyodbc5a.so > > [PostgreSQL Unicode Driver] > Driver = /usr/local/lib/psqlodbcw.so > > Igors-MacBook-Air:~ igorkorot$ cat .odbc.ini > [ODBC Data Sources] > myodbc = MySQL ODBC 5.3 Unicode Driver > myodbca = MySQL ODBC 5.3 ANSI Driver > postgre = PostgreSQL Unicode Driver > > [ODBC] > Trace = 0 > TraceAutoStop = 0 > TraceFile = > TraceLibrary = > > [myodbc] > Driver = MySQL ODBC 5.3 Unicode Driver > SERVER = localhost > PORT = 3306 > > [myodbca] > Driver = MySQL ODBC 5.3 ANSI Driver > SERVER = localhost > PORT = 3306 > > [postgre] > Driver = PostgreSQL Unicode Driver > SERVER = localhost > PORT = 5432 > User = postgres > Password = wasqra > Database = postgres > [/code] If I am following this: http://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/FAQ#What%27s%20an%20odbc.ini%20and%20what%20do%20I%20put%20in%20it%3F then should it not be: [postgre] Driver = /usr/local/lib/psqlodbcw.so host = localhost SERVER = localhost ServerName = localhost PORT = 5432 UserName = postgres Password = wasqra Database = postgres > > Please tell me if I made a mistake configuring the DSN. > > Now when trying to connect to the database I'm getting following error: How did you connect? > > [quote] > Could not connect to server. No such file or directory. > [/quote] > > Also, just for the reference, here is the files in /usr/local/lib: > > [code] > Igors-MacBook-Air:~ igorkorot$ ls -la /usr/local/lib/ > total 27152 > drwxr-xr-x 14 root wheel 476 Dec 3 10:45 . > drwxrwxr-x 9 root wheel 306 Jun 4 2016 .. > -rwxr-xr-x 1 root wheel 367404 Jan 12 2016 libcppunit-1.12.1.0.0.dylib > lrwxr-xr-x 1 root wheel 27 Jan 12 2016 > libcppunit-1.12.1.dylib -> libcppunit-1.12.1.0.0.dylib > -rw-r--r-- 1 root wheel 3740688 Jan 12 2016 libcppunit.a > lrwxr-xr-x 1 root wheel 27 Jan 12 2016 libcppunit.dylib -> > libcppunit-1.12.1.0.0.dylib > -rwxr-xr-x 1 root wheel 860 Jan 12 2016 libcppunit.la > -rwxr-xr-x 1 root wheel 4604056 Jun 18 2014 libmyodbc5a.so > -rwxr-xr-x 1 root wheel 4600096 Jun 18 2014 libmyodbc5w.so > drwxr-xr-x 3 root wheel 102 Jan 12 2016 pkgconfig > -rwxr-xr-x 1 root wheel 945 Dec 3 10:45 psqlodbcw.la > -rwxr-xr-x 1 root wheel 555716 Dec 3 10:45 psqlodbcw.so > lrwxr-xr-x 1 root wheel 16 Jan 31 2016 wxPython -> wxPython-3.0.2.0 > drwxr-xr-x 6 root wheel 204 Nov 27 2014 wxPython-3.0.2.0 > [/code] > > Could anyone spot an error? > Or maybe I have to have a non-default database in order to connect via ODBC? > > Thank you. > > P.S.: Hopefully the mailer will understand that there is a > continuation of the old thread... > > On Sat, Dec 3, 2016 at 2:30 PM, Adrian Klaver wrote: >> On 12/03/2016 11:00 AM, Igor Korot wrote: >>> >>> Adrian, >> >> >>> >>> Thank you. >>> >>> BTW, is there a setup library generated? Maybe that the reason the driver >>> is >>> not in the list? >>> >>>> >> >> To add: >> >> http://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/ODBCOnUnix >> >> >> -- >> Adrian Klaver >> adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc