CA API Gateway - Stopping MySQL Replication When Relocating Secondary DB Node
book
Article ID: 192040
calendar_today
Updated On:
Products
CA API Gateway
Issue/Introduction
A scenario may arise where the Secondary Clustered Gateway node with MySQL Database Replication established requires relocation to new infrastructure. For this Use Case it is best practices to stop MySQL DB Replication between nodes before any moves are made.
For this use case the hostname and IP address of your affected (relocated) node are not changing.
Environment
Release : 9.x Cluster with MySQL DB Replication enables between Primary and Secondary Nodes
Component : API GATEWAY
Cause
A required Infrastructure move of the Secondary DB node in a Gateway Cluster
Resolution
Before moving your Secondary node it is important to stop MySQL Database Replication between the Primary and Secondary DB nodes of the cluster and then establish proper MySQL DB Replication between nodes.
First: stop MySQL DB Replication by creating an SSH connection to BOTH the Primary and Secondary Gateway Appliance, dropping into the privileged root shell and running: mysql -e "STOP SLAVE\G"
This will stop MySQL Replication Between Nodes and can be checked with command:
mysql -e "SHOW SLAVE STATUS\G"
A properly stopped replication status will show an output as such:
Now you are ready to power-down and move the Secondary node for relocation
After your Secondary node is relocated to the final infrastructure destination and restarted and both SSG Services and MySQL are up and running (including replication) perform the following step:
On the Primary MySQL DB node run:
mysql -e "START SLAVE\G"
This will restart replication between the Primary and Secondary node.
As a final step please run mysql -e "SHOW SLAVE STATUS\G" from both the Primary and Secondary nodes to ensure healthy MySQL DB Replication, which should output as such: