Go to main content

Oracle® Solaris Cluster Data Service for Oracle GoldenGate Guide

Exit Print View

Updated: January 2016
 
 

Database Preparation

Use the following instructions to prepare the database:

  • On both nodes, make sure the following lines are in the MySQL my.cnf configuration file.

    On psoma1:

        # GoldenGate requirements
        log-bin=/mys/data/logs/bin-log 
        log-bin-index=/mys/data/logs/bin-log.index
        max_binlog_size=4096
        binlog-format=ROW
        #  GoldenGate requirements end

    On psoma2

        # GoldenGate requirements
        log-bin=/mys/data/logs/bin-log   
        log-bin-index=/mys/data/logs/bin-log.index
        max_binlog_size=4096
        binlog-format=ROW
        #  GoldenGate requirements end
  • In both nodes, set the socket to the following value in the my.cnf file:

    socket=/tmp/mysql.sock

    As of the time of creating this deployment example, /tmp/mysql.sock must be used as the socket for the MySQL database. Check your Oracle GoldenGate document for the latest information.

  • Restart the database resource as shown:

    psoma1 # clrs disable mys-rs
    psoma1 # clrs enable mys-rs
    
  • On both nodes, create a database to be replicated and an User for Oracle GoldenGate.

    For the sake of simplicity, in a lab install, make the gg user as the administrator.

    root@psoma1:~# /usr/local/mysql/bin/mysql -S /tmp/mysql.sock -uroot -proot
    mysql> use mysql
    mysql> GRANT ALL ON *.* TO 'gg'@'localhost' IDENTIFIED BY 'gg';
    mysql> GRANT ALL ON *.* TO 'gg'@'psoma1' IDENTIFIED BY 'gg';
    mysql> GRANT ALL ON *.* TO 'gg'@'psoma2' IDENTIFIED BY 'gg';
    mysql> create database golden;
    mysql> exit
         
    root@psoma1:~# /usr/local/mysql/bin/mysql -h /psoma1 -ugg -pgg
    mysql> use golden
    mysql> create table tab1 (row1 int not null, row2 char(64));
    mysql> create unique index ind1 on tab1(row1);
            
    root@psoma2:~# /usr/local/mysql/bin/mysql -S /tmp/mysql.sock -uroot -proot
    mysql> use mysql
    mysql> GRANT ALL ON *.* TO 'gg'@'localhost' IDENTIFIED BY 'gg';
    mysql> GRANT ALL ON *.* TO 'gg'@'psoma1' IDENTIFIED BY 'gg';
    mysql> GRANT ALL ON *.* TO 'gg'@'psoma2' IDENTIFIED BY 'gg';
    mysql> create database golden;
    mysql> exit
           
    root@psoma2:~# /usr/local/mysql/bin/mysql -h psoma2 -ugg -pgg
    mysql> use golden
    mysql> create table tab1 (row1 int not null, row2 char(64));
    mysql> create unique index ind1 on tab1(row1);
    mysql> exit