然后到从(刚才的主)来连接 主(刚才的从)
mysql> change master to master_host='192.168.0.254',master_user='cange2',master_password='canshifu',master_log_file='mysql-bin.000009',master_log_pos=107;
Query OK, 0 rows affected (0.01 sec)
然后启动 slave进程
mysql> start slave;
Query OK, 0 rows affected (0.01 sec)
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.0.254
Master_User: cange2
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000009
Read_Master_Log_Pos: 107
Relay_Log_File: CAN-GE-3-relay-bin.000002
Relay_Log_Pos: 253
Relay_Master_Log_File: mysql-bin.000009
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
本文来自linux系统运维:http://www.linuxyw.com/linux/yunweiguzhang/20130504/152.html |