设为首页 加入收藏

TOP

MYSQL主从复制搭建全过程实战---探索不能实时同步的关键性参数(二)
2015-07-24 12:13:17 来源: 作者: 【 】 浏览:86
Tags:MYSQL 主从 复制 搭建 全过程 实战 --- 探索 不能 实时 同步 关键性 参数
1 row in set (0.00 sec)


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;

?

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇MySQL和PostgreSQL导入数据对比 下一篇高性能Mysql――Schema与数据类型..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: