1.master.info file
Located at the slave end of the data directory, storage slave connected to master information, such as the master host address, connection user, password, port, the log information has been obtained.
The Master.info file is modified and deleted during the copy process, and replication is not interrupted. If stop slave, then start slave, can start up normally, because MySQL has memorized the information, but when restarting MySQL, at start slave, when the restart fails, it will prompt you change master to
2.relay Log
The Mysql-relay-bin.xxxxxn file is used to hold the binary log information read from the master side of the I/O thread on the slave side, and then the SQL thread from the slave side reads and parses the corresponding log information from the relay log. Into the SQL statement executed by master and then applied on the slave side.
3.relay-log.info file
Similar to Master.info, stores information about the relay log that is written to the local slave I/O thread. SQL threads for the slave end and some administrative operations are ready to get information about the current replication.
The general situation after the master-slave switch, need to reset slave, clear relay-log.info.
4.mysql-bin.index
Record binary log files on disk. MySQL relies on this file, unless there is a record in this file, otherwise MySQL cannot identify the binary log file.
5.mysql-relay-bin-index
Index file for the trunk log
Master.info and Relay_log.info are still used by default in 5.6. A new feature is also introduced: Crash-safe slave, which can write replication information to a table in the MySQL database.
(1) When the variable master-info-repository is set to file, the Master.info file is used, and when set to table, the master information is written to the Mysql.slave_master_info table.
(2) When the variable relay-log-info-repository is set to file, the Relay-log.info file is used, and when set to table, the information is written to the Mysql.slave_relay_log_info table.
Both tables are MyISAM engine tables, which are recommended to modify the InnoDB engine table:
mysql> Stop slave;mysql> ALTER TABLE mysql.slave_master_info engine=innodb;mysql> ALTER TABLE mysql.slave_ Relay_log_info engine=innodb;mysql> start slave;
Related files for MySQL replication