故障案例:级联主从change master to Could not initialize master info structure

现象:

mysql> changemaster tomaster_user='ucloudbackup',master_password='XXXXXX',master_log_pos=45522795,master_log_file='mysql-bin.000077',master_host='XXXX';

ERROR 1201(HY000): Could not initialize master info structure; more error messages can befound in the MySQL error log

mysql> show  slave status\G

Empty set (0.00sec)

错误日志信息:
151202 21:38:21 [ERROR] Failed to open the relay log '/opt/udb/instance/mysql-5.5/udb-11qsow/relaylog/mysql-relay.000999' (relay_log_pos 46921264)
151202 21:38:21 [ERROR] Could not find target log during relay log initialization
151202 21:40:10 [ERROR] Error reading master configuration


 解决方法1 

mysql> reset  slave all;

Query OK, 0 rowsaffected (0.00 sec)

 

mysql> change master to master_user='ucloudbackup',master_password='XXXXXX',master_log_pos=45522795,master_log_file='mysql-bin.000077',master_host='XXXXX';

Query OK, 0 rowsaffected (0.00 sec)

解决方法2

直接删除残留的master.info和relay-log.info


报错条件:级联主从m-s-s1,s停服后,物理文件copy到s1,启动db前没有删除master.info和relay-log.info


你可能感兴趣的:(Replication)