11.对slave做相应的配置
mysql> show slave status;
Empty set (0.16 sec)
mysql> change master to
-> master_host='192.168.60.3',
-> master_port=3306,
-> master_user='repl',
-> master_password='hunter0',
-> master_log_file='test2_log-bin.000002',
-> master_log_pos=311 ;
Query OK, 0 rows affected (0.08 sec)
mysql> show slave status \G;
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: 192.168.60.3
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: test2_log-bin.000002
Read_Master_Log_Pos: 311
Relay_Log_File: test1-relay-bin.000001
Relay_Log_Pos: 4
Relay_Master_Log_File: test2_log-bin.000002
Slave_IO_Running: No ------注意还有启动slave
Slave_SQL_Running: No ------注意还有启动slave
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 311
Relay_Log_Space: 98
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
1 row in set (0.01 sec)