Table of Contents

Search

  1. Preface
  2. Part 1: PowerExchange CDC Introduction
  3. Part 2: PowerExchange CDC Components
  4. Part 3: PowerExchange CDC Data Sources
  5. Part 4: Change Data Extraction
  6. Part 5: Monitoring and Tuning
  7. Appendix A: DTL__CAPXTIMESTAMP Time Stamps

CDC Guide for Linux, UNIX, and Windows

CDC Guide for Linux, UNIX, and Windows

Preparing MySQL Sources

Preparing MySQL Sources

To prepare a MySQL source system for PowerExchange CDC, you must perform a few configuration tasks.
  1. Verify that your MySQL version is supported and installed on a supported Red Hat Linux or Windows operating system.
  2. Verify that the MySQL mysqlbinlog utility is installed on the system where change capture processing will occur. This location can be local to or remote from the source database. The following configurations meet this requirement:
    • Run PowerExchange and the mysqlbinlog utility on the MySQL source database server.
    • Run PowerExchange and the mysqlbinlog utility on a machine that is remote from the MySQL source database server. Either specify the mysqlbinlog path in the Path environment variable or specify the mysqlbinlog full path and file name in the MYSQLBINLOG parameter in the MYSQL CAPI_CONNECTION statement in the dbmover configuration file.
  3. If PowerExchange capture will run on a Linux system, configure ODBC on that system so that PowerExchange will be able to use the ODBC driver to connect to the MySQL server. Perform the following steps:
    • Set the ODBCINI and ODBCINST environment variables. Use the following export statements:
      export ODBCINI=$PWX_HOME/ODBC7.1/odbc.ini export ODBCINST=$PWX_HOME/ODBC7.1/odbcinst.ini
    • Set the shared LD_LIBRARY_PATH environment variable. Use the following statements:
      LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$PWX_HOME/ODBC7.1/lib; export LD_LIBRARY_PATH
    • Update the ODBC driver information in the odbc.ini and odbcinst.ini files. For example, add the following statement:
      Driver=
      pwx_home
      /ODBC7.1/lib/DWmysql27.so
      The
      pwx_home
      variable represents the local path to the DataDirect installation that PowerExchange uses.
  4. Enable binary logging with the options that PowerExchange requires on the MySQL source database in one of the following ways:
    • If you start the MySQL database server from the command line, enter the following command:
      mysqld --server-id[=
      server_id
      ] --log-bin[=
      base_name
      ] --binlog-format[=row]
      --binlog-row-image[=full]
    • If you start the MySQL database server as a service on Windows or as a daemon on Linux, you can specify database configuration settings in an .ini or .cnf configuration file. The default file, my.ini, is located in the MySQL installation directory. To enable binary logging, add the following lines to your MySQL configuration file:
      [mysqld] server-id=
      server_id
      log-bin=
      base_name
      binlog-format=row binlog-row-image=full
    • For MySQL 5.7.
      x
      , you must use a number greater than 0 for the server-id value.
    • Informatica recommends that you include the optional log-bin parameter to specify the base name for the sequence of binary log files. To create the binary log file names, MySQL adds a numeric suffix to the base name, which is incremented each time a new binary log is created. If you do not specify a base name, MySQL uses the default base name of
      host_name
      -bin.
    • PowerExchange requires row-based binary logging with the row image type of full. Verify that the binlog-format parameter is set to row and that the binlog-row-image parameter is set to full. These values are the default values.
  5. Create a MySQL user that PowerExchange can use to connect to the MySQL database. Use the following SQL statement:
    CREATE USER '
    pwx_user
    '@'%' IDENTIFIED BY '
    password
    ';
  6. Grant the following privileges that are required for CDC to the PowerExchange user:
    GRANT SELECT ON
    database_name
    .* TO '
    pwx_user
    '@'%'; GRANT REPLICATION CLIENT ON *.* TO '
    pwx_user
    '@'%';
    If the user needs to access binary logs on a remote MySQL server, grant the following additional privilege:
    GRANT REPLICATION SLAVE ON
    database_name
    .* TO '
    pwx_user
    '@'%';

Back to Top

0 COMMENTS

We’d like to hear from you!