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.
  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.config 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™).
    Table 1. Shared library environment setting for MySQL
    MySQL version Shared library environment setting
    MySQL 5.1 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.
    1. Define the MySQL database driver:
      dbi.database.dbname.driver = "dbmmys"
    2. The "source" parameter defines the name of the MySQL database.
      dbi.database.dbname.source = "test1"