????????
?????????????????????????????????????????????????????????????????????????????????μ???????????
??????????????????????????????????????????????
??????????????????????????????????????????????
????????????
??????????????IP???192.168.56.128??mysql??????????????????
?????????????IP???192.168.56.129??mysql????????
??????????????mysql????????????????
???????????????
????????????????в???
??????1??????????????
????insert into mysql.user(host??user??password) values("localhost"??"rep1"??password("mysql"));
????flush privileges;
????grant replication slave on *.* to rep1@192.168.56.129 identified by 'mysql';
??????2???????????????
????mysql> show master status;

????????File???Position????????????д????????????????????á?
??????????????
??????1????????????????????/etc/my.cnf
???????“server-id=2”??????????id??б????mysql????????á?
??????2?????mysql????
????mysqld_safe --user=mysql &
??????3??mysql???
????mysql -uroot -p
??????4??????????sql???
????mysql> change master to master_host='192.168.56.128'??master_user='rep1'
??????master_password='mysql'??master_log_file='mysql-bin.000004'??master_log_pos=477;
?????????к??????
????mysql> start slave;
?????????slave????????
??????5????????????
??????????????
????mysql>show slave statusG
???????????????????????????????????????????????????????

????Slave_IO???????slave_SQL????????????????У?????????б??????“slave”??????????????????????????Yes?????????No???У???