RDS MySQL replication error: Slave failed to initialize relay log info structure from the repository

ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository

This issue happens on configuring MySQL replication from AWS RDS to self-hosted server. We can resolve this by restarting the replication.

Step1: Login to the slave MySQL terminal as root.

Step2: Check the slave status.

>show slave status \G;

Please note tha values of Master_Log_File and Read_Master_Log_Pos from the result.

Step3: Reset the slave.

>reset slave;

This will clear the master replication configurations from slave.

Step4: Reconfigure replication.

>CHANGE MASTER TO MASTER_HOST='host', MASTER_USER='user', MASTER_PASSWORD='password', MASTER_LOG_FILE='log-file', MASTER_LOG_POS= log-position;

Here we need to replace the values of host, user, password, log-file and log-position with the corresponding values.

Step5: Start the replication.

>start slave;

Now the replication should starts working.

That's all…

Leave a Reply

Your email address will not be published. Required fields are marked *