The reason: There is a file under the directory where MySQL holds the data Master.info,mysql server thinks Master.info is higher than the MY.CNF priority, the first boot slave,master.info does not exist, from the MY.CNF read the option value, save to Master.info, and then start slave, will read the configuration information directly from Master.info.
That is, in the case where master.info already exists, modifying the replication configuration in my.cnf does not work, and other configuration items will still work.
The command-line operation is also saved directly to Master.info.
Workaround:
Each time you start MySQL, you remove master.info, forcing you to read the configuration copied in the MY.CNF, and avoid maintaining two configuration files.
Note:
1, Master.info put in the MySQL database directory, how to view the database directory? Show variables like '%dir% ', find DataDir
2, the high version of MySQL, has no master.info file, that is, every time from the MY.CNF read data.
Configuration copied in mysql5.1 version my.cnf does not work