Cisco Cisco Prime Network Registrar 8.1 Troubleshooting Guide
MySQL Database Replication Guide
16
• Resynchronizing a Slave
3.3 Resynchronizing a Slave
Even with the MySQL Production Executive and Backup Executive servers configured
properly, the slave can get out of sync with the master. One method of resolving this is to use
the resync_master.sh script to start over with a fresh database dump from the master. When
completed, the script displays instructions on the next steps you need to take to resynchronize
a slave.
3.3.1 Dumping the Master Database
To execute the resync_master.sh script, follow these steps.
1
As
incadmin user on the Production Executive, change directory to
/opt/incontrol/etc/support.
>cd /opt/incontrol/etc/support
2
Execute the script command.
>./resync_master.sh
The script begins by dumping the master database and determining the log file
coordinates.
Stopping replication slave process with: STOP SLAVE
Dumping the master database and getting Log File Coordinates ...
Master Log File Coordinates:
MASTER_LOG_FILE='mysql-bin.000001'
MASTER_LOG_POS=14158333
Dump File: dbforrepl.sql
Finally, the script displays the steps necessary to resynchronize the slave, including the
correct parameters to pass to the resync_slave.sh script on the Backup Executive.
Re-synchronization 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.
system.
- Navigate to /opt/incontrol/etc/support.
- Once there, run the resync_slave.sh script using the coordinates as follows:
./resync_slave.sh -l mysql-bin.000001 -s 14158333 -h 192.168.196.45 -d <location of
dbforrepl.sql>
dbforrepl.sql>
3
Make a note of the following values from the screen output, which you need when
executing the resync_slave.sh script.
The name of the MySQL log file, displayed in MASTER_LOG_FILE=