通常当使用master-slave模式,而slave主机更换时会发生这个问题,这是因为relay log默认是主机相关的,会因为主机名的变化导致出错。
解决方法可以参考官方文档:
http://dev.mysql.com/doc/refman/5.1/en/slave-logs-relaylog.html
16.2.2.1. The Slave Relay Log
The relay log, like the binary log, consists of a set of numbered files containing events that describe database changes, and an index file that contains the names of all used relay log files.
The term “relay log file” generally denotes an individual numbered file containing database events. The term “relay log” collectively denotes the set of numbered relay log files plus the index file.
Relay log files have the same format as binary log files and can be read using mysqlbinlog (see Section 4.6.7, “