1. 程式人生 > >處理更改 MySQL relay log 目錄後 slave 無法啟動故障

處理更改 MySQL relay log 目錄後 slave 無法啟動故障

root repl tar ini recover epo sent init 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;

處理更改 MySQL relay log 目錄後 slave 無法啟動故障