改为Innodb引擎,防止表损坏后自行修复 alter table slave_master_info engine=innodb;
alter table slave_relay_log_info engine=innodb;
alter table slave_worker_info engine=innodb;
。
3.在my.cnf中设置 relay_log_info_repository = TABLE master_info_repository = TABLE relay_log_recovery = on
mysql> show variables like '%relay_log_info_repository%'; +---------------------------+-------+ | Variable_name | Value | +---------------------------+-------+ | relay_log_info_repository | FILE | +---------------------------+-------+ 1 row in set (0.00 sec)
mysql> show variables like '%master_info_repository%'; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | master_info_repository | FILE | +------------------------+-------+ 1 row in set (0.00 sec)