Configuring MySQL for Remote Capture
Oracle GoldenGate remote capture for MySQL, Amazon RDS for MySQL, Amazon Aurora MySQL, Azure Database for MySQL are used to capture transaction log data from a database located remotely to the Oracle GoldenGate installation.
Database Server Configuration
For remote capture to work, configure the MySQL server as follows:
-
Grant access permissions to the Oracle GoldenGate remote capture user.
Run the following statements against the remote database to create the user and grant the permissions needed for remote capture.
mysql > CREATE USER 'username'@'host' IDENTIFIED BY 'Password'; mysql > GRANT ALL PRIVILEGES ON *.* TO 'username'@'host’ WITH GRANT OPTION; mysql > FLUSH PRIVILEGES;
-
The
server_id
value of the remote MySQL server should be greater than 0. This value can be verified by issuing the following statement on the MySQL remote server:mysql > show variables like ‘server_id’;
If the
server_id
value is 0, modify themy.cnf
configuration file to set to a value greater than 0.
Oracle GoldenGate Configuration
Oracle GoldenGate configuration has the following steps:
-
Provide the remote database's connection information in the Extract's parameter file.
SOURCEDB remotedb@mysqlserver.company.com:port, USERID username, PASSWORD password
-
Add the following parameter to the Extract's parameter file, after the connection information.
TRANLOGOPTIONS ALTLOGDEST REMOTE
Limitations of Oracle GoldenGate Remote Capture for MySQL
Co-existence of Oracle GoldenGate for MySQL remote capture with the MySQL’s native replication slave is supported with following conditions and limitations:
-
The native replication slave should be assigned a different server_id than the currently running slaves. The slave server_id values can be seen using the following MySQL command on the master server.
mysql> show slave hosts;
-
If the Oracle GoldenGate capture abends with error
"A slave with the same server_uuid or server_id as this slave has connected to the master"
, then change the capture's name and restart the capture. -
If the native replication slave dies with the error
"A slave with the same server_uuid or server_id as this slave has connected to the master"
, then change the native replication slave’sserver_id
and restart it.
-
-
Remote capture is supported for Oracle GoldenGate on running on Linux and can support databases running on Linux or Windows.