IBM Support

DataStage ODBC connectivity to MySQL Community Edition databases

Technote (FAQ)


How can DataStage ODBC be configured to connect to the Community edition (open source) MySQL databases which are not commercially licensed?


Information Server / DataStage distributions include an OEM installation of the DataDirect ODBC driver software. The bundled ODBC drivers include a MySQL Wire Protocol driver that can be used with commercially licensed versions of MySQL only (i.e. Enterprise edition). Due to commercial license restrictions, this DataDirect driver will not connect to the MySQL Community (open source, non-commercially licensed) version.

If you have a requirement to connect DataStage to the MySQL Community edition, it is possible for the end user to use the open-source ODBC driver with the DataDirect driver manager.

Important: This open-source driver is not supplied by IBM. The end user must obtain and install the driver. Though IBM permits this configuration, direct support of the open-source driver will not be provided by IBM.

The following instructions are provided as reference material only, for the Linux platform. End users may need to adapt these instructions according to their specific software version and/or platform. These instructions are known to work at the time of writing and are provided on an as-is basis, with no implied commitment from IBM that these instructions will work in all end user environments.

  1. Download the open source MySQL ODBC Connector from Example file name for 32-bit linux platforms: mysql-connector-odbc-5.1.6-linux-glibc2.3-x86-32bit.tar.gz

  2. Extract the file contents to a directory of your choice and make sure the directory is added to the end of the load library path environment variable in your dsenv file. Example for Linux:

    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mysql_odbc/lib/; export LD_LIBRARY_PATH

    After modifying the dsenv file, you must stop and restart the DataStage Engine.

  3. Add a DSN entry to your .odbc.ini file, located in $DSHOME. Note that this example contains annotations for the various properties. You must remove these annotations when updating your actual .odbc.ini file.

    Driver=/opt/mysql_odbc/lib/ (put your own path and driver name in here)
    Description=Connector/ODBC 3.51 Driver DSN

  4. You must also add the Data Source Name to the uvodbc.config file in your Project directory. Example:


  5. Test the connection. If you see an error like this:

    SQLConnect error: Status = -1 SQLState = IM003 Natcode = 0 [ODBC] [DataDirect][ODBC lib] Specified driver could not be loaded Invalid parameter(s) found in configuration file

    then you may have to create a link to a shared library. Use the "ldd" utility to check why the driver will not load:

    $ ldd => (0xffffe000) => /lib/ (0xf7d15000) => /lib/ (0xf7cfe000) => /lib/ (0xf7cd6000) => not found => /lib/ (0xf7cd2000) => /lib/ (0xf7cbb000) => /lib/ (0xf7b78000)
    /lib/ (0x00981000)

  6. In this case, it could not find a library named . However, in branded_odbc/lib , we do have . Create a link in branded_odbc/lib :

    $ ln -s
    $ ls -al libodbc*

    -rwxr-xr-x 1 dsadm dstage 1101596 Nov 4 06:00
    lrwxrwxrwx 1 dsadm dstage 14 Dec 16 17:08 ->

Document information

More support for: InfoSphere DataStage

Software version: 8.5, 8.7, 9.1,, 11.3, 11.5, 11.7

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Software edition: All Editions

Reference #: 1458603

Modified date: 19 January 2011