使用了 CHANGE MASTER 来设置 slave 的 master 信息以后。发现注释掉my.cnf 里面关于master-* 这块的信息,任然能连上 master 服务。
奇怪了感觉。所以查看了下 my.cnf 关于这块的解释
Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
才知道,原来,使用命令 CHANGE MASTER 是会在slave 创建一个叫 master.info 的文件来保存关于master 的信息的。~_~