Cisco Cisco Prime Network Registrar 8.1 Troubleshooting Guide
MySQL Database Replication Guide
14
• Demoting a Master and Promoting a Slave
IPControl MySQL Replication Monitor stopped.
IPControl MySQL Replication Monitor remove successful.
Adding the read_only option to configuration file ...
Turning on read_only flag with: set @@global.read_only := 1
The script continues by calculating the log file coordinates.
Master Log File Coordinates:
MASTER_LOG_FILE='mysql-bin.000001'
MASTER_LOG_POS=87592
Finally, the script displays the steps necessary to promote an existing slave (Passive
Master), including the correct parameters to pass to the
promote_master.sh
script on
the Backup Executive.
Promotion / Demotion Step 1 of 2 complete!
If you plan to promote an existing slave (Passive Master) follow these steps:
- Record the Active Master Log File Coordinates and log in to the existing Passive
Master system.
Master system.
- Navigate to /opt/incontrol/etc/support.
- Once there, run the promote_master.sh script using the coordinates as follows:
- ./promote_master.sh -l mysql-bin.000001 -s 87592
3
Make a note of the following values from the screen output, which you need when
executing the
promote_master.sh
script on the slave server.
The name of the MySQL log file, displayed in
MASTER
_
LOG_FILE=
The replication start coordinates of the log file, displayed in
MASTER_LOG_POS=
4
Execute the following commands.
# $INCHOME/etc/incontrol stop
# $INCHOME/etc/support/DemoteExec.sh
# $INCHOME/etc/incontrol start
3.2.2 Promoting the Slave
For the current slave (Passive Master) to assume the role of master after the current Active
Master has been demoted, the
promote_master.sh
script must be run on the slave system,
using the coordinates provided by the
demote_master.sh
script executed on the
Production Executive (or Active Master).