1.開啟bingo
配置master 的my.cnf
server-id=1
log-bin=/var/lib/mysql/log-bin
配置slave 的my.cnf ?
server-id=2 ? ?
relay-log=/var/lib/mysql/relay-bin
relay-log-index=/var/lib/mysql/relay-bin.index
--查看master的狀態(tài)
show master status;
配置下面的master_log_file 和master_log_pos?
change master to master_host='192.168.26.150',master_port=3306,master_user='repl',master_password='repl',master_log_file='mysql_bin.000001',master_log_pos=0
--查看是否配置成功
show slave status\G;