Difference: SandboxTestPage (9 vs. 10)

Revision 102011-07-11 - ChrisBrower

Line: 1 to 1
Changed:
<
<

APPX 4.2.9, MySQL, and UnixODBC on RHEL 6/Scientific Linux 6/Oracle Linux 6

>
>

APPX 4.2.9, MySQL, and UnixODBC on RHEL 6/Scientific Linux 6/Oracle Linux 6/CentOS 6

 

Overview

Changed:
<
<
This document will demonstrate how to configure APPX 4.2.9 and MySQL 64 bit on a 64 bit Red Hat based Linux server using 32 bit unixODBC drivers.
>
>
This document will demonstrate how to configure APPX 4.2.9 and MySQL on a 64 bit or 32 bit Red Hat based Linux server using 32 bit unixODBC drivers.
 

32-Bit Red Hat/Scientific Linux/Oracle Linux 6

Added:
>
>
Configuring APPX 4.2.9 and MySQL on 32 bit Red Hat using unixODBC drivers should be the simplest option because bitness shouldn't be an issue. Here is what I did to make it work:

Installing MySQL

MySQL can be installed with yum by installing the following packages:

mysql.i686 : MySQL client programs and shared libraries
mysql-server.i686 : 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.i686 : A complete ODBC driver manager for Linux
mysql-connector-odbc.i686 : 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. I didn't need to make any changes to this file, but if you are unable to connect, make sure the path to the 32-bit driver is correct. For APPX, the path to the 64 bit driver is not important.

[root@localhost ~]# cat /etc/odbcinst.ini
# Example driver definitions

# 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
[root@localhost ~]#

The odbc.ini file is another one that may need to be configured. It is also found in /etc. Make sure all the information there is correct. The database should match the database you are trying to connect to. Here's an example of what this file should look like, but check to make sure it is correct for your system.

[root@localhost ~]# cat /etc/odbc.ini
[mysql]
Description     = mysql
Driver          = mysql
Server          = localhost
Database        = test
Port            =
Socket          =
Option          =
Stmt            =
[root@localhost ~]#

Configuring appx.env

The appx.env file needs to be configured to point APPX to the 32-bit MySQL ODBC Connector drivers. I didn't have to make any changes to this file when I installed the connector using the package manager. The line beginning with APPX_ODBC_LIB should contain the path to the 32-bit connector driver. It should look something like this:

APPX_ODBC_LIB=/usr/lib/libmyodbc5.so
 

64-Bit Red Hat/Scientific Linux/Oracle Linux 6

APPX can connect to 64-bit MySQL using 32-bit ODBC connector drivers and some 32-bit libraries that can be installed through the package manager.

Changed:
<
<

Installing MySQL

>
>

Installing MySQL

  MySQL can be installed with yum by installing the following packages:
Changed:
<
<
mysql.i686 : MySQL client programs and shared libraries
mysql-server.i686 : The MySQL server and related files
>
>
mysql.x86_64 : MySQL client programs and shared libraries
mysql-server.x86_64 : The MySQL server and related files
 

Installing unixODBC

Line: 23 to 72
 

Installing the ODBC Connectors

Changed:
<
<
The 32-bit connectors might not be included in the repository. If they are, you would find them under a name like
mysql-connector-odbc.i686

If they are not there, they can be installed with: (You may want to modify this link to match your distro. I was running Scientific Linux 6, so I went to Scientific Linux's site and found the package there.)

>
>
The 32-bit connectors might not be included in the repository. If they are not there, they can be installed with: (You may want to modify this link to match your distro. I was running Scientific Linux 6, so I went to Scientific Linux's site and found the package there.)
 
yum install http://ftp1.scientificlinux.org/linux/scientific/6.0/i386/os/Packages/mysql-connector-odbc-5.1.5r1144-7.el6.i686.rpm

Configuring odbc.ini and odbcinst.ini

Line: 73 to 119
 

Testing/Troubleshooting

32-bit

Added:
>
>
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@localhost ~]# isql mysql
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>
 

64-bit

ISQL can be used to test the connection between MySQL and unixODBC using the 32-bit 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. You will need to have the 32-bit ISQL file for it to be a valid test, otherwise it will be testing the 64-bit driver, which is not used in APPX. To find out the bitness of ISQL, run the file command on it. This is how it should look(ELF 32-bit):

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback