Cisco Cisco Prime Network Registrar 8.1 Troubleshooting Guide

Page of 31
Scenario 
Seq 
Original Production 
Executive 
DR Executive 
New Production 
Executive 
 
 
resync_slave.sh using 
coordinates from Prod. Exec. 
 
 
4.2  MySQL Replication Setup Examples 
   
4.2.1  Setting up Replication for the First Time 
The following shows an example of setting up MySQL 
Replication on existing Production and Disaster Recovery 
Executive systems.  The values used for the log coordinates 
and IP Addresses will vary with every installation.  They are 
shown here for demonstration purposes only. 
4.2.1.1  Define Active Master on the Production Executive 
In order to begin the process of setting up replication, we need to prepare the 
Active Master on the Production Executive.  So we run the following command 
on the Production Executive. 
>./prepmaster.sh 
Creating replication monitor database with: CREATE DATABASE IF NOT EXISTS 
REPLMON 
Configuring Active Master settings ... 
 
Backed up /opt/incontrol/mysql/my.cnf to 
/opt/incontrol/mysql/my.cnf.pre_replication 
Configuration file updated: /opt/incontrol/mysql/my.cnf 
Restarting MySQL daemon ... 
 
Stopping MySQL Database Server... 
MySQL Database Server stopped. 
Waiting 5 seconds before starting... 
 
Starting MySQL Database Server... 
MySQL Database Server started. 
Waiting 10 seconds for mysql to start ... 
Stopping replication slave process with: STOP SLAVE 
Disconnecting from old master with: CHANGE MASTER TO MASTER_HOST='' 
Resetting slave with: RESET SLAVE 
 
Dumping the master database and getting Log File Coordinates ... 
Master Log File Coordinates: 
MASTER_LOG_FILE='mysql-bin.000001' 
MASTER_LOG_POS=2645 
 
Dump File: dbforrepl.sql 
 
Replication Setup Step 1 of 3 complete! 
 
- Copy the Dumpfile: dbforrepl.sql to the slave server. 
- Record the Active Master Log File Coordinates and log in to the passive 
master system. 
- Navigate to /opt/incontrol/etc/support. 
- Once there, run the prepslave.sh script using the coordinates as follows: 
 
./prepslave.sh -l mysql-bin.000001 -s 2645 -h 192.168.196.45 -d <location of 
dbforrepl.sql>