Changing a Replica to Become the Primary
Follow the procedure to promote a replica to a primary role. This guide details the steps for planned failovers or topology reorganization with minimal downtime.
Stopping the Original Master.
Manually Take Down the Primary
FLUSH TABLES WITH READ LOCK;SHOW MASTER STATUS;
+--------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+--------------------+----------+--------------+------------------+
| mariadb-bin.000003 | 343 | | |
+--------------------+----------+--------------+------------------+
SELECT @@global.gtid_binlog_pos;
+--------------------------+
| @@global.gtid_binlog_pos |
+--------------------------+
| 0-1-2 |
+--------------------------+Preparing the Replica to be a Primary
Reconnect Other Replicas to the New Primary
Changing the Old Primary to be a Replica
Moving Applications to Use New Primary
See Also
PreviousBinlog Event ChecksumsNextReplication When the Primary and Replica Have Different Table Definitions
Last updated
Was this helpful?

