处理更改 MySQL relay log 目录后 slave 无法启动故障

问题:更改 relay log 目录后 slave 无法启动


2018-08-03T02:53:36.172465Z 0 [ERROR] Failed to open the relay log './mysql03-relay-bin.000018' (relay_log_pos 9680848).
2018-08-03T02:53:36.172515Z 0 [ERROR] Could not find target log file mentioned in relay log info in the index file '/var/lib/mysql/logs/relay-bin.index' during relay log initialization.
2018-08-03T02:53:36.222879Z 0 [ERROR] Slave: Failed to initialize the master info structure for channel ''; its record may still be present in 'mysql.slave_master_info' table, consider deleting it.
2018-08-03T02:53:36.222955Z 0 [ERROR] Failed to create or recover replication info repositories.
2018-08-03T02:53:36.222995Z 0 [ERROR] Slave SQL for channel '': Slave failed to initialize relay log info structure from the repository, Error_code: 1872
2018-08-03T02:53:36.223007Z 0 [ERROR] /usr/sbin/mysqld: Slave failed to initialize relay log info structure from the repository
2018-08-03T02:53:36.223014Z 0 [ERROR] Failed to start slave threads for channel ''

处理方法:

mysql> reset slave;
mysql> change master to master_host='192.168.1.224',master_user='root',master_password='MySQL5.7',master_auto_position=1;
mysql> start slave;

转载于:https://blog.51cto.com/linux10000/2153984

你可能感兴趣的:(处理更改 MySQL relay log 目录后 slave 无法启动故障)