3、备库上没有同步过去,但我在备库操作flush logs;命令就能同步过来!
4、查主库上的几个参数:
mysql> show variables like '%autocommit%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | autocommit | ON | +---------------+-------+ 1 row in set (0.00 sec) mysql> show variables like '%innodb_flush_metho%'; +---------------------+----------+ | Variable_name | Value | +---------------------+----------+ | innodb_flush_method | O_DIRECT | +---------------------+----------+ 1 row in set (0.00 sec) mysql> show variables like '%sync_binlog%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | sync_binlog | 100 | +---------------+-------+ 1 row in set (0.00 sec)
5、找到原因:sync_binlog=100,在主库把参数:sync_binlog设为1即可!!!
set global sync_binlog=1; ---最好永久设置改my.cnf配置文件
6、记下常用几个命令
reset master;
show master status\G;
show binlog events in 'binlog.000001';
flush logs;
?