环境,由于工作需要在测试机上先停掉,mysql-master,在slave端:
mysql> show slave status\G; *************************** 1. row *************************** Slave_IO_State: Master_Host: 192.168.0.10 Master_User: replication Master_Port: 3306 Connect_Retry: 60 Master_Log_File: updatelog.000003 Read_Master_Log_Pos: 1291 Relay_Log_File: sunss-2-relay-bin.000003 Relay_Log_Pos: 1436 Relay_Master_Log_File: updatelog.000003 Slave_IO_Running: No *********没有同步******** Slave_SQL_Running: No
|
重新设定同步状态:
mysql> mysql> slave stop; Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> change master to master_host='192.168.0.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> 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.0.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)
|
阅读(2345) | 评论(0) | 转发(0) |