实验环境:
主MySQL服务器 源码安装 IP地址:172.16.1.1
从主MySQL服务器 rpm安装IP地址:172.16.1.10
从MySQL服务器 rpm安装 IP地址:172.16.1.11


下面开始配置:
主MySQL服务器:

vi /etc/my.cnf
[mysqld]
log-bin=a_master
server-id=1
授权给 172.16.1.10 访问权限
grant replication slave on *.* to 'slave'@'172.16.1.10' identified by 'king123';

从主MySQL服务器:
vi /etc/my.cnf
[mysqld]
server-id=2
log-bin=b_master
log-slave-updates
master-host=172.16.1.1
master-user=slave
master-password=king123
授权给 172.16.1.11 访问权限
grant replication slave on *.* to 'slave'@'172.16.1.11' identified by 'king123';

从MySQL服务器:
vi /etc/my.cnf
[mysqld]
server-id=3
master-host=172.16.1.10
master-user=slave
master-password=king123
如果出现不同步情况 清空所有日志记录 再重新同步