MySQ binlog三种模式
MySQ binlog三种模式及设置方法
1.1 Row Level 行模式
1.2 Statement Level(默认)
1.3 Mixed 自动模式
行模式和语句模式的区别
1.4 企业场景如何选择binlog模式
1.5 如何配置binlog
root@oldboy 11:28:05->show global variables like '%binlog_format%';
+---------------+-----------+
| Variable_name | Value |
+---------------+-----------+
| binlog_format | STATEMENT |
+---------------+-----------+
1 row in set (0.00 sec)
[myslqd]
log-bin=mysql-bin
#binlog_format="STATEMENT"
#binlog_format="ROW"
#binlog_format="MIXED"
mysql>SET GLOBAL binlog_format = 'ROW';
mysql>show global variables like '%binlog_format%';
- 其他模式命令为:
- SET GLOBAL binlog_format = 'MIXED';
- SET GLOBAL binlog_format = 'STATEMENT';
[root@db01 3306]# mysqlbinlog --base64-output="decode-rows" --verbose mysql-bin.000248
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#160628 11:06:52 server id 1 end_log_pos 107 Start: binlog v 4, server v 5.5.49-log created 160628 11:06:52 at startup
# Warning: this binlog is either in use or was not closed properly.
ROLLBACK/*!*/;
# at 107
#160628 11:07:09 server id 1 end_log_pos 177 Query thread_id=1 exec_time=0 error_code=0
SET TIMESTAMP=1467083229/*!*/;
SET @@session.pseudo_thread_id=1/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=33/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
BEGIN
/*!*/;
# at 177
# at 223
#160628 11:07:09 server id 1 end_log_pos 223 Table_map: `oldboy`.`sc` mapped to number 33
#160628 11:07:09 server id 1 end_log_pos 785 Update_rows: table id 33 flags: STMT_END_F
### UPDATE `oldboy`.`sc`
### WHERE
### @1=1
### @2=1001
MySQ binlog三种模式的更多相关文章
- mysql bin-log三种模式
MySQL的bin-log日志备份有三种模式,分别是:ROW.Statement.Mixed 一.Row 日志会记录成每一行数据被修改成的形式,然后再slave端再对相同的数据进行修改,只记录要修改的 ...
- 转载-MySQL binlog三种模式及设置方法
原文地址:http://www.cnblogs.com/yangliheng/p/6187327.html 1.1 Row Level 行模式 日志中会记录每一行数据被修改的形式,然后在slave端 ...
- MySQL binlog三种模式
1.1 Row Level 行模式 日志中会记录每一行数据被修改的形式,然后在slave端再对相同的数据进行修改 优点:在row level模式下,bin-log中可以不记录执行的sql语句的上下文 ...
- MySQL binlog日志三种模式选择及配置
在认识binlog日志三种模式前,先了解一下解析binlog日志的命令工mysqlbinlog.mysqlbinlog工具的作用是解析mysql的二进制binlog日志内容,把二进制日志解析成可以在M ...
- Mysql Binlog三种格式介绍及分析【转】
一.Mysql Binlog格式介绍 Mysql binlog日志有三种格式,分别为Statement,MiXED,以及ROW! 1.Statement:每一条会修改数据的sql都会记录在 ...
- git push :推送本地更改到远程仓库的三种模式
摘要:由于在git push过程中,no-fast-forward 的push会被拒绝,如何解决git push失败的问题?这里面有三种方法,分别会形成merge形式的提交历史,线性形式的提交历史,覆 ...
- App开发三种模式
APP开发三种模式 现在App开发的模式包含以下三种: Native App 原生开发AppWeb App 网页AppHybrid App 混合原生和Web技术开发的App 详细介绍: http:// ...
- [转]VMware Workstation网络连接的三种模式
经常要使用VMWare Workstation来在本地测试不同的操作系统,以前也搞不清楚网络连接三种模式,最近看了几篇文章才算明白.现总结如下: 1. VMware Workstation的虚拟网络组 ...
- LVS三种模式配置及优点缺点比较
目录: LVS三种模式配置 LVS 三种工作模式的优缺点比较 LVS三种模式配置 LVS三种(LVS-DR,LVS-NAT,LVS-TUN)模式的简要配置 LVS是什么: http://www.lin ...
随机推荐
- php中数组自定义排序
php中数组自定义排序方法有很多,现在只提usort();不会保留原有键名. unsort调用方法就是unsrot($arr,func); 注意: 如果func是写在当前类中的话,那么调用的方式是 u ...
- xampp
Fatal error: Class 'kernel' not found in C:\xampp\htdocs\shopex\install\install.core.php on line 10 ...
- mysql 分布式事务
php + mysql 分布式事务 事务(Transaction)是访问并可能更新数据库中各种数据项的一个程序执行单元: 事务应该具有4个属性:原子性.一致性.隔离性.持续性 原子性(atomicit ...
- Oracle11g for RedHat6.4安装手册
一. 检查 Oracle 11g 安装所依赖的软件包 检查包是否安装 # rpm -q 包名 包名: 1 ) binutils 2 ) compat-libstdc++ 3) elfutils ...
- Face The Right Way
Face The Right Way Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 2564 Accepted: 117 ...
- [转]Using Replacement Strings with Regex.Replace
本文转自:http://www.knowdotnet.com/articles/regereplacementstrings.html The String.Replace function has ...
- H.264编码之IDCT变换原理
上次讲到了DCT变换的推导过程,这次主要给大家讲下IDCT反变换的推导过程.建议大家先看上次讲的DCT变换公式推导过程.这样在看这篇文章时会容易很多!话不多说,让我们开始IDCT的旅程吧! IDCT反 ...
- hdu 1495 非常可乐 广搜
#include<iostream> #include<cstdio> #include<cstring> #include<queue> ][][]; ...
- hdu1565 网络流或状态压缩DP
对于网络流有一个定理: 最小点权覆盖集=最大网络流: 最大点权独立集=总权值-最小点权覆盖集: 网络流解法代码如下: #include<cstdio> #include<iostre ...
- Delphi2009下编译提示“无法找到“Excel_TLB”
这是没有安装Excel组件导致的,安装Excel组件的步骤是: 1.新建Package工程 2.在Office安装目录下找到文件XL5CHS32.OLB 我的Office版本是2007,XL5CHS3 ...