MYSQL主备出现这个错误: ERROR 1201 (HY000):

mysql互为主从,但是在SLAVE执行CHANGE MASTER时,出现这个错误: ERROR 1201 (HY000): Could not initialize master! 错误如下:
mysql> 
mysql> slave stop;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> change master to master_host='192.168.100.10',master_user='replication',master_password='123456',master_log_file='updatelog.000004',master_log_pos=106;
ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log

网上查了一些资料,终于找到一个很好的解决办法(如下):
mysql> slave stop;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> reset slave;

Query OK, 0 rows affected,(0.00 sec)

mysql> change master to master_host='192.168.100.10',master_user='replication',master_password='123456',master_log_file='updatelog.000004',master_log_pos=106;
Query OK, 0 rows affected (0.05 sec)
mysql> slave start;
Query OK, 0 rows affected (0.00 sec)

这样就完成mysql主从设置了,你可以执行
mysql > show slave status \G;
Slave_IO_Running: Yes
Slave_SQL_Running: Yes

出现这个问题的原因,应该是以前mysql做过主从!

引用自(己验证有效):http://waynerqiu.com/3/74.html