启动从时报错:
mysql> start slave;
ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
reset slave之后可以:
mysql> reset slave;
Query OK, 0 rows affected (0.00 sec)
mysql> change master to master_host='192.xxx.xxx.xxx', master_user='xxx', master_password='xxxx', master_log_file='1xxxxx', master_log_pos=xxxx;
Query OK, 0 rows affected, 2 warnings (0.04 sec)
参数解释:
master_log_file-->主库binlog-->对应 Master_Log_File
master_log_pos-->读取主库binlog位置-->对应 Read_Master_Log_Pos
mysql> start slave;
Query OK, 0 rows affected (0.02 sec)