???????????
????1?????????ip??192.168.1.31???????ip??192.168.1.32
????2????????????????????????????
?????????裺
????1????????????????????????????????
????[root@zhu~]#vim/etc/my.cnf
????[mysqld]
????server_id=31
????log_bin
????[root@zhu~]#servicemysqlrestart
????2?????????????????
????mysql>grantreplicationslaveon*.*toslave@"192.168.1.32"identifiedby"123";
????3???????????????????????????????
????[root@cong~]#vim/etc/my.cnf
????[mysqld]
????server_id=32
????[root@cong~]#servicemysqlrestart
????4??????????????????????
????mysql>changemasterto
????->master_host="192.168.1.31"??
????->master_user="slave"??
????->master_password="123"??
????->master_log_file="localhost-bin.000001"??
????->master_log_pos=472;
????5???????????????????
????mysql>startslave;