Prepare the runtime environment - connecting to the database

  1. In order to connect to MySQL, you must have a MySQL database driver "dbmmys*" in FGLDIR/dbdrivers.
  2. The MySQL client software is required to connect to a database server. Check if the MySQL client library (libmysqlclient.*) is installed on the system. The shared library version of the MySQL client library must match the libmysqlclient library version linked to the dbmmys*.so ODI driver. For example, dbmmys55x.so requires libmysqlclient.so.18 to be installed.
  3. Make sure that the MySQL client environment variables are properly set. Check for example MYSQL_HOME (the path to the installation directory), DATADIR (the path to the data files directory), etc. See MySQL documentation for more details about client environment variables to be set.
  4. Check the MySQL client configuration options in the my.cnf file. The driver will read the options defined in the [client] group. Note that your can specify a particular configuration file with the dbi.database.dbname.mys.optionsfile FGLPROFILE configuration parameter.
  5. Check the database client locale settings (default-character-set option in the my.cnf configuration file). The database client locale must match the locale used by the runtime system (LC_ALL,LANG).
  6. Verify the environment variable defining the search path for the database client shared library (libmysqlclient.so on UNIX™, LIBMYSQL.dll on Windows™). On UNIX platforms, the variable is specific to the operating system. For example, on Solaris and Linux™ systems, it is LD_LIBRARY_PATH , on AIX® it is LIBPATH, or HP/UX it is SHLIB_PATH . On Windows, you define the DLL search path in the PATH environment variable.
    Table 1. Shared library environment setting for MySQL
    MySQL version Shared library environment setting
    MySQL 5.0 and higher UNIX : Add $MYSQL_HOME/lib to LD_LIBRARY_PATH (or its equivalent). Windows : Add %MYSQL_HOME%\bin to PATH.
  7. To verify if the MySQL client environment is correct, you can start the MySQL command interpreter:
    $ mysql dbname -u appadmin -p
  8. Set up the fglprofile entries for database connections.
    Important: Make sure that you are using the ODI driver corresponding to the database client and server version. Because Informix® features emulation are dependant from the database server version, it is mandatory to use the same version of the database client and ODI driver as the server version.