1.在从库上设置master_info信息时出错
mysql> change master to master_host='192.168.157.143',master_port=3306,master_user='backup',master_password='redhat',master_log_file='mysql-bin.000002',master_log_pos=597;
ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log
2.解决方法
mysql> slave stop; <--停掉slave
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> reset slave; <--重设置一个slave;
Query OK, 0 rows affected (0.00 sec)
mysql> change master to master_host='192.168.157.143',master_port=3306,master_user='backup',master_password='redhat',master_log_file='mysql-bin.000002',master_log_pos=597; <--再次设置同步信息
Query OK, 0 rows affected (0.05 sec)
mysql> slave start; <--启动slave
Query OK, 0 rows affected (0.00 sec)
mysql> show slave status G; <--同步正常
Slave_IO_Running: Yes
Slave_SQL_Running: Yes