Installing unixODBC and MyODBC Drivers



File
Location
unixODBC http://www.unixodbc.org/download.html
MyODBC 3.51 -- development release
http://www.mysql.com/downloads/index.html
MyODBC 2.50 -- stable release
http://www.mysql.com/downloads/index.html

Before beginning

Remove the Previous Installation
rpm -qa unixODBC
rpm -ev <output-from-previous-command>
Note: When running the above command it will fail due to dependencies so just uninstall all the dependent packages... Only do this if you know you wont broke anything that you are using.
Download the above files to /usr/local/src and untar them using
tar -zxf <package_name.tar.gz>

Install unixODBC

./configure
make
make install

Mysql ODBC Driver Configure Args

This is the ./configure line I used to compile the 2.50 and 3.51 MyODBC drivers

 ./configure --with-odbc-ini=/usr/local/etc/odbc.ini \
--with-mysql-libs=/usr/local/mysql/lib \
--with-mysql-includes=/usr/local/mysql/include \
--with-unixODBC=/usr/local \
--with-unixODBC-includes=/usr/local/include/ \
--with-unixODBC-libs=/usr/local/lib


As can be noted I have installed mysql in /usr/local/mysql and the odbc.ini is now in /usr/local/etc as apposed to the normal RedHat location of /etc

Notes

I couldn't get my MyODBC 3.51 Driver to work with OpenOffice 1.0 but the MyODBC 2.50 driver works fine.

James McDonald