我要评分
获取效率
正确性
完整性
易理解

"Error 1872" Is Displayed When a Kunpeng Node Is Added to the Primary/Secondary Replication Deployment

Symptom

When the Kunpeng node is added to the primary/secondary replication, ERROR 1872 is reported after the SQL statement start slave; is executed to start the replication process of the Kunpeng secondary database.

The complete error message is as follows:

1
2
mysql> start slave; 
ERROR 1872 (HY000): Replica failed to initialize applier metadata structure from the repository

Key Process and Cause Analysis

Misoperations (for example, gtid_mode is not set to ON) occur when the secondary database is connected to the primary database. As a result, the primary/secondary relationship fails to be established. When establishing the primary/secondary relationship again, reset the replication metadata of the secondary database.

Conclusion and Solution

Reset the configurations of the secondary database and then start the replication process of the Kunpeng secondary database.

  1. Reset the secondary database configurations.
    1
    reset slave;
    
  2. Restart the replication process of the Kunpeng secondary database.
    1
    start slave;