//master 主服務器 mysql
vi /etc/my.conf sql
log-bin=mysql-bin
server-id=222 服務器
//建立同步賬號
GRANT REPLICATION SLAVE ON *.* to 'mysync'@'172.168.16.105' identified by 'yLGxdSTwmY' ide
//slave server
server-id=221 同步
change master to master_host='192.168.130.198',master_user='mysync',master_password='yLGxdSTwmY',master_log_file='mysql-bin.000022',master_log_pos=107;
start slave ast