Table of Contents

Search

  1. Preface
  2. Data Replication Overview
  3. Understanding Data Replication
  4. Sources - Preparation and Replication Considerations
  5. Targets - Preparation and Replication Considerations
  6. Starting the Server Manager
  7. Getting Started with the Data Replication Console
  8. Defining and Managing Server Manager Main Servers and Subservers
  9. Creating and Managing User Accounts
  10. Creating and Managing Connections
  11. Creating Replication Configurations
  12. Materializing Targets with InitialSync
  13. Scheduling and Running Replication Tasks
  14. Implementing Advanced Replication Topologies
  15. Monitoring Data Replication
  16. Managing Replication Configurations
  17. Handling Replication Environment Changes and Failures
  18. Troubleshooting
  19. Data Replication Files and Subdirectories
  20. Data Replication Runtime Parameters
  21. Command Line Parameters for Data Replication Components
  22. Updating Configurations in the Replication Configuration CLI
  23. DDL Statements for Manually Creating Recovery Tables
  24. Sample Scripts for Enabling or Disabling SQL Server Change Data Capture
  25. Glossary

Preparing MySQL Source Systems

Preparing MySQL Source Systems

After you install Informatica Data Replication on a Linux or Windows system that contains a MySQL source, you must complete several tasks to prepare the system for data replication.
  1. For Windows systems, download and install the ODBC driver for MySQL. For Linux systems, use the DataDirect ODBC driver for MySQL that Data Replication provides in the
    DataReplication_installation
    /dd/lib subdirectory.
  2. Use one of the following strategies to enable binary logging on the MySQL source database:
    • 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
      ]
    • If you start the MySQL database server as a service on Windows or Linux, you 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
    • For MySQL 5.7.3 and later, you must specify a server ID number greater than 0.
    • 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
      host_name
      -bin as the base name.
    • Data Replication requires row-based binary logging. Verify that the binlog-format parameter is set to ROW before creating a Data Replication configuration that has a MySQL source. For MySQL 5.7 and later, the default binlog-format value is ROW.
  3. Create a database user that Data Replication uses to connect to the source database. In the following example, the user name is datarep_user:
    CREATE USER 'datarep_user'@'%' IDENTIFIED BY '
    password
    ';
  4. Grant the following privileges to the user ID that Data Replication uses to connect to the MySQL source:
    • To enable the user to select data rows from tables in the database, grant the following privilege:
      GRANT SELECT ON
      database_name
      .* TO '
      datarep_user
      '@'%';
    • To enable the user to access local binary logs, grant the following privileges:
      GRANT REPLICATION CLIENT ON *.* TO '
      datarep_user
      '@'%'; GRANT SELECT, LOCK TABLES ON
      database_name
      .* TO '
      datarep_user
      '@'%';
    • To enable the user to capture data from all databases, grant the following privileges:
      GRANT SELECT, LOCK TABLES ON *.* TO '
      datarep_user
      '@'%';
    • To enable the user to access remote binary logs, grant the following privilege:
      GRANT REPLICATION SLAVE ON
      database_name
      .* TO '
      datarep_user
      '@'%';
  5. If the default.cfg file exists in the
    DataReplication_installation
    /uiconf/
    directory, set the show_mysql_source_db_tab parameter to true in this file to enable support for MySQL sources.
  6. To extract change data from a remote MySQL database server when the Extractor runs on a Red Hat Linux version 7.0 or later system, specify the lib64 directory before the $DBSYNC_HOME/support directory in the LD_LIBRARY_PATH environment variable.
    For example:
    export LD_LIBRARY_PATH=/lib64:$DBSYNC_HOME/support:$LD_LIBRARY_PATH
    An Extractor task that runs on Red Hat Linux 6.5 cannot extract change data from a remote MySQL database server.

0 COMMENTS

We’d like to hear from you!