Bug 103283 - ODBCConfig doesn't work for PostgreSQL or MySQL
Summary: ODBCConfig doesn't work for PostgreSQL or MySQL
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux Beta
Classification: Retired
Component: unixODBC
Version: beta1
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Fernando Nasser
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-08-28 15:19 UTC by Chris Ricker
Modified: 2007-04-18 16:57 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-09-03 00:50:09 UTC
Embargoed:


Attachments (Terms of Use)

Description Chris Ricker 2003-08-28 15:19:11 UTC
In /etc/odbcinst.ini, I have:

[MySQL]
Description             = ODBC for MySQL
Driver          = /usr/lib/libmyodbc.so
FileUsage               = 1

[PostgreSQL]
Description             = ODBC for PostgreSQL
Driver          = /usr/lib/libodbcpsql.so.2
Setup           = /usr/lib/libodbcpsqlS.so.2
FileUsage               = 1
CPTimeout               = 
CPReuse         = 

In ODBCConfig, when I try to use either PostgreSQL or MySQL, I go to User DSN
and click Add. It gives my a choice of PostgreSQL or MySQL. For either one, when
I try to use it, it says

Could not construct a property list for (PostgreSQL) || (MySQL)
General Installer Error
General Installer Error

Comment 1 Fernando Nasser 2003-08-28 19:52:39 UTC
This is a known problem in the MyODBC package.

Please add the line:

Setup           = /usr/lib/libodbcmyS.so.1

to your /etc/odbcinst.ini file.

It should now look like:

# From the MyODBC package
[MySQL]
Description     = ODBC for MySQL
Driver          = /usr/lib/libmyodbc.so
Setup           = /usr/lib/libodbcmyS.so.1
FileUsage       = 1


It should have worked for PostgreSQL though.
Have you checked if the file
/usr/lib/libodbcpsqlS.so.2
is installed on your system?


Regards,
Fernando

Comment 2 Chris Ricker 2003-08-28 21:05:46 UTC
I've done that in the past to work around this bug in MyODBC, but I can't do it
here. I'm using MyODBC-2.50.39-15.i386.rpm, and it doesn't include the
libodbcmyS.so library file at all.



Comment 3 Fernando Nasser 2003-09-02 15:19:00 UTC
What does:

rpm -q -i unixODBC

and

rpm -q -l unixODBC

say?

Can you also do a:

rpm -V unixODBC

please?

Thanks.

Comment 4 Fernando Nasser 2003-09-02 15:29:25 UTC
> I'm using MyODBC-2.50.39-15.i386.rpm, and it doesn't include the
libodbcmyS.so library file at all.

Please note that this file comes in the unixODBC package, _not_ in the MySQL
package or even in the MyODBC package.  This is a shared library that contains
default values for the unixODBC tools.

Comment 5 Chris Ricker 2003-09-03 00:41:59 UTC
Well, wherever it comes from, it's not in rawhide unixODBC either, and neither
is /usr/lib/libodbcpsqlS.so.2, which is probably why neither works

[kaboom@skuld kaboom]$ rpm -qi unixODBC MyODBC
Name        : unixODBC                     Relocations: (not relocateable)
Version     : 2.2.5                             Vendor: Red Hat, Inc.
Release     : 1                             Build Date: Mon 07 Jul 2003 03:26:08
PM MDT
Install Date: Sun 17 Aug 2003 08:43:47 AM MDT      Build Host:
porky.devel.redhat.com
Group       : System Environment/Libraries   Source RPM: unixODBC-2.2.5-1.src.rpm
Size        : 1994825                          License: LGPL
Signature   : DSA/SHA1, Wed 16 Jul 2003 02:33:54 PM MDT, Key ID fd372689897da07a
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.unixODBC.org/
Summary     : A complete ODBC driver manager for Linux.
Description :
Install unixODBC if you want to access databases through ODBC. This
package includes drivers for PostgreSQL and local files. If you want
to develop programs that will access data through ODBC, you need to
install the unixODBC package.
Name        : MyODBC                       Relocations: (not relocateable)
Version     : 2.50.39                           Vendor: Red Hat, Inc.
Release     : 15                            Build Date: Thu 03 Jul 2003 07:31:26
AM MDT
Install Date: Sat 23 Aug 2003 04:33:55 PM MDT      Build Host: bugs.devel.redhat.com
Group       : System Environment/Libraries   Source RPM: MyODBC-2.50.39-15.src.rpm
Size        : 122007                           License: Public Domain
Signature   : DSA/SHA1, Wed 16 Jul 2003 02:21:47 PM MDT, Key ID fd372689897da07a
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.mysql.com/downloads/api-myodbc.html
Summary     : ODBC driver for MySQL.
Description :
An ODBC driver for MySQL, for use with unixODBC
[kaboom@skuld kaboom]$ rpm -V MyODBC unixODBC
S.5....T c /etc/odbc.ini
S.5....T c /etc/odbcinst.ini
[kaboom@skuld kaboom]$ 



Comment 6 Chris Ricker 2003-09-03 00:43:38 UTC
Scratch that -- was looking on the wrong system


Comment 7 Chris Ricker 2003-09-03 00:50:09 UTC
On the rawhide box, I have

[kaboom@skuld kaboom]$ ls /usr/lib/libodbc*S.so.*
/usr/lib/libodbcdrvcfg1S.so.1      /usr/lib/libodbcmyS.so.1.0.0
/usr/lib/libodbcdrvcfg1S.so.1.0.0  /usr/lib/libodbcnnS.so.1
/usr/lib/libodbcdrvcfg2S.so.1      /usr/lib/libodbcnnS.so.1.0.0
/usr/lib/libodbcdrvcfg2S.so.1.0.0  /usr/lib/libodbcpsqlS.so.1
/usr/lib/libodbcminiS.so.1         /usr/lib/libodbcpsqlS.so.1.0.0
/usr/lib/libodbcminiS.so.1.0.0     /usr/lib/libodbctxtS.so.1
/usr/lib/libodbcmyS.so.1           /usr/lib/libodbctxtS.so.1.0.0
[kaboom@skuld kaboom]$ 

with unixODBC-2.2.5-1 installed

With those, if I put

[MySQL]
Description             = ODBC for MySQL
Driver          = /usr/lib/libmyodbc.so
Setup           = /usr/lib/libmyodbcS.so.1
FileUsage               = 1

[PostgreSQL]
Description             = ODBC for PostgreSQL
Driver          = /usr/lib/libodbcpsql.so.2
Setup           = /usr/lib/libodbcpsqlS.so.1
FileUsage               = 1
CPTimeout               = 
CPReuse         = 

in /etc/odbcinst.ini, all is well.... Closing NOTABUG, thanks, though it does
seem to me that this should be more set up out-of-the-box....

Comment 8 Fernando Nasser 2003-10-14 18:57:22 UTC
Sorry for getting back to this.  I want to follow up on your suggestion and try
to make it more "out-of-the-box".

In the MySQL entry did you mean /usr/lib/libodbcmyS.so or was it indeed 
/usr/lib/libmyodbcS.so? (please note the position of the "my" in thiose names.

[MySQL]
Description             = ODBC for MySQL
Driver          = /usr/lib/libmyodbc.so
Setup           = /usr/lib/libmyodbcS.so.1
FileUsage               = 1

Thanks.

Comment 9 Chris Ricker 2003-10-14 21:27:33 UTC
/usr/lib/libodbcmyS.so

Here's the actual (cut-and-paste) of my file, and it's working for me:

[kaboom@skuld kaboom]$ more /etc/odbcinst.ini 
[MySQL]
Description             = ODBC for MySQL
Driver          = /usr/lib/libmyodbc.so
Setup           = /usr/lib/libodbcmyS.so.1
FileUsage               = 1

[PostgreSQL]
Description             = ODBC for PostgreSQL
Driver          = /usr/lib/libodbcpsql.so.2
Setup           = /usr/lib/libodbcpsqlS.so.1
FileUsage               = 1
CPTimeout               = 
CPReuse         = 

[kaboom@skuld kaboom]$ 

Thanks for changing this, BTW

Comment 10 Fernando Nasser 2003-10-14 21:32:51 UTC
That is what I thought.

Thank you very much for the clarification.

Regards,
Fernando


Comment 11 Fernando Nasser 2003-10-16 14:21:43 UTC
We can't create the MySQL section in this package because the driver comes from
the MySQL distribution.  So what we have is just a commented suggestion for a
MySQL entry.   I've added a couple of comment lines that, based on your
experience, will allow people to get it to work more easily.  I will tell the
MySQL guys about this as well in case they add an entry to the file in their RPM.

Here is the new odbcinst.ini:

# Example driver definitinions
#
#

# Included in the unixODBC package
[PostgreSQL]
Description     = ODBC for PostgreSQL
Driver          = /usr/lib/libodbcpsql.so
Setup           = /usr/lib/libodbcpsqlS.so
FileUsage       = 1


# Driver from the MyODBC package
# Setup from the unixODBC package
#[MySQL]
#Description    = ODBC for MySQL
#Driver         = /usr/lib/libmyodbc.so
#Setup          = /usr/lib/libodbcmyS.so
#FileUsage      = 1


Comment 12 Chris Ricker 2003-10-16 14:34:25 UTC
Thanks, that looks good!


Note You need to log in before you can comment on or make changes to this bug.