如果AB不同步
1)查看辅助的sql日志 tailf /var/log/mysqld.log
140304 11:59:18 [Note] Slave I/O thread: connected to master ‘[email protected]:3306‘, replication started in log ‘binlog.000011‘ at position 294
#从服务器是否可以顺利到达主服务器
如果发现你的用户名密码有错误 /etc/my.cnf /var/lib/mysql/master.info
2)查看sql线程是否报错
140304 11:59:08 [Note] Slave SQL thread initialized, starting replication in log ‘binlog.000011‘ at position 294, relay log ‘/var/lib/mysql/mysql-relay-bin.000001‘ position: 4
手动去执行同步
1)mysql> slave stop;
2)mysql> CHANGE MASTER TO MASTER_HOST=‘192.168.18.254‘,MASTER_USER=‘slave‘,MASTER_PASSWORD=‘123456‘,MASTER_LOG_FILE=‘binlog.000011‘;
3) mysql > slave start;
如果出现开始同步 且AB同步后数据不一致
备份主库 去 手动同步到一致状态 再去执行手动同步中的1 ,2, 3步
时间: 2024-12-28 17:55:38