APPX 4.2.9, MySQL, and UnixODBC on RHEL 5/Scientific Linux 5/Oracle Linux 5/CentOS 5
Overview
This document will demonstrate how to configure APPX 4.2.9 and MySQL on a 64 bit or 32 bit Red Hat 5 based Linux server using 32 bit unixODBC drivers.
32 Bit
APPX and MySQL can be configured using the unixODBC drivers in 32 bit Red Hat 5 using all packages found in the default package manager.
Installing MySQL
MySQL can be installed with yum by installing the following packages:
mysql.i386 : MySQL client programs and shared libraries
mysql-server.i386 : The MySQL server and related files
Installing UnixODBC and the MySQL ODBC Connector
UnixODBC can also be installed using yum by installing the following packages:
unixODBC.i386 : A complete ODBC driver manager for Linux
mysql-connector-odbc.i386 : ODBC driver for MySQL
Configuring odbc.ini and odbcinst.ini
The odbcinst.ini file, found in /etc, must be configured to point to the 32-bit MySQL ODBC Connector driver. The default configuration on my install had the wrong driver version listed, so it may need to be changed to match the driver version you have installed.
[root@slinux ~]# cat /etc/odbcinst.ini
# Example driver definitinions
#
#
# Driver from the MyODBC package
# Setup from the unixODBC package
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libmyodbc3.so
Setup = /usr/lib/libodbcmyS.so
FileUsage = 1
[root@slinux ~]#
odbc.ini may also need to be edited. It was a blank text file on my tests before I edited it. Make sure all the information in the file matches your system. It should look similar to this:
[root@slinux ~]# cat /etc/odbc.ini
[mysql]
Description = mysql
Driver = mysql
Server = localhost
Database = test
Port =
Socket =
Option =
Stmt =
[root@slinux ~]#
Configuring appx.env
The appx.env file has a line beginning with APPX_ODBC_LIB, which points to the MySQL UnixODBC Connector driver. It can be remarked out. APPX should not have any trouble locating the driver without it.
#APPX_ODBC_LIB=/usr/lib/libmyodbc5.so
64 Bit
Troubleshooting/Testing
32 Bit
ISQL can be used to test the connection between MySQL and unixODBC using the MySQL ODBC Connector driver. ISQL isn't necessary for APPX to connect to MySQL, but it can be a useful tool for testing the driver APPX will be using. Bitness shouldn't be an issue with 32 bit Red Hat. A successful test should look like this:
[root@slinux ~]# isql mysql
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
64 Bit