Oracle GoldenGate MySQL to MySQL Configuration part 1

Part 1 contain Installation and Configguration of MySQL database in Rhel 7 server. Source and target MySQl database for GoldenGate will be on same server.

Abhii
4 min readNov 9, 2020

Step1 :- Download and add MySQL Yum Repository to Linux Repository.

# wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

Step 2:- Install the downloaded package by using below command.

# yum local install mysql80-community-release-el7–3.noarch.rpm

Step 3:- Verify that the MySQL Yum repository has been added successfully.

# yum repolist enabled | grep “mysql.*-community.*”

Step 4:- Install latest MySQL using below command.

# yum install mysql-community-server

Step 5:- Start MySQL Server and enable it, using below commands.

# systemctl start mysqld

# systemctl enable mysqld

Step 6:- When MySQL 8.0 version is installed, temporary password for root is stored in mysqld.log file. Run below command to list the password.

# cat /var/log/mysqld.log | grep ‘temporary password’

Step7:- Get the password and then run below command. To create new password and other things(check screen-shot)

# mysql_secure_installation

Step8:- Login to MySQL database. (below command can be run from other OS user also)

# mysql -u root -p

Create MySQL Source and Target database

Step1:- Create Two Mysql database one for source one for Target

[opc@pocgg OGG19c]$ mysql -u root -p

mysql> show databases;
+ — — — — — — — — — — +
| Database |
+ — — — — — — — — — — +
| ggtest |
| information_schema |
| mysql |
| performance_schema |
| sys |
+ — — — — — — — — — — +
5 rows in set (0.00 sec)

mysql> CREATE DATABASE sourcegg DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
Query OK, 1 row affected, 2 warnings (0.01 sec)

mysql> CREATE DATABASE targetgg DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
Query OK, 1 row affected, 2 warnings (0.01 sec)

mysql> show databases;
+ — — — — — — — — — — +
| Database |
+ — — — — — — — — — — +
| ggtest |
| information_schema |
| mysql |
| performance_schema |
| sourcegg |
| sys |
| targetgg |
+ — — — — — — — — — — +
7 rows in set (0.00 sec)

Note:- Source Database for GoldenGate will be sourcegg and target database for GoldenGate will be targetgg.

Step 2:- Create GoldenGate user for sourcegg and targetgg databases and grant then required privilege's.

mysql> CREATE USER ‘ggsuser_S’@’%’ IDENTIFIED BY ‘Ggsuser$1234’;
Query OK, 0 rows affected (0.01 sec)

mysql> GRANT ALL PRIVILEGES ON sourcegg.* TO ‘ggsuser_S’@’%’ WITH GRANT OPTION;
Query OK, 0 rows affected (0.01 sec)

mysql> CREATE USER ‘ggsuser_T’@’%’ IDENTIFIED BY ‘Ggsuser$1234’;
Query OK, 0 rows affected (0.01 sec)

mysql> GRANT ALL PRIVILEGES ON targetgg.* TO ‘ggsuser_T’@’%’ WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

Step 3:- Check to login to sourcegg and targetgg database from ggsuer_S and ggsuer_T respectively.

--

--