binlog_format不同模式下,对mysqlbinlog恢复的影响
(root@g1-db-test-v01:3306)[(none)]>use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
(root@g1-db-test-v01:3306)[test]>update db1.t2 set name='haha' where id=105;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0 (root@g1-db-test-v01:3306)[test]>use db1;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
(root@g1-db-test-v01:3306)[db1]>delete from test.t1 where id=11;
Query OK, 1 row affected (0.02 sec)
/*!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
#170809 15:38:35 server id 1882073306 end_log_pos 120 CRC32 0x9c11ffa3 Start: binlog v 4, server v 5.6.23-72.1-log created 170809 15:38:35
# Warning: this binlog is either in use or was not closed properly.
BINLOG '
+7uKWQ/aKC5wdAAAAHgAAAABAAQANS42LjIzLTcyLjEtbG9nAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAaP/
EZw=
'/*!*/;
# at 120
#170809 15:39:20 server id 1882073306 end_log_pos 198 CRC32 0x58ea2e3a Query thread_id=75 exec_time=0 error_code=0
SET TIMESTAMP=1502264360/*!*/;
SET @@session.pseudo_thread_id=75/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1073741824/*!*/;
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 198
# at 313
#170809 15:39:20 server id 1882073306 end_log_pos 344 CRC32 0xb2671190 Xid = 32389
COMMIT/*!*/;
# at 344
#170809 15:41:05 server id 1882073306 end_log_pos 422 CRC32 0x4befc6fe Query thread_id=75 exec_time=0 error_code=0
SET TIMESTAMP=1502264465/*!*/;
BEGIN
/*!*/;
# at 422
#170809 15:41:05 server id 1882073306 end_log_pos 526 CRC32 0x2b0ef4d4 Query thread_id=75 exec_time=0 error_code=0
use `db1`/*!*/;
SET TIMESTAMP=1502264465/*!*/;
delete from test.t1 where id=11
/*!*/;
# at 526
#170809 15:41:05 server id 1882073306 end_log_pos 557 CRC32 0xb34d26a0 Xid = 32473
COMMIT/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
(END)
上面的binlog只记录了 delete from test.t1 where id=11
(root@g1-db-test-v01:3306)[(none)]>use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
(root@g1-db-test-v01:3306)[test]>update db1.t2 set name='hehe' where id=105;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0 (root@g1-db-test-v01:3306)[test]>use db1;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
(root@g1-db-test-v01:3306)[db1]>delete from test.t1 where id=10;
Query OK, 1 row affected (0.02 sec)
/*!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
#170809 16:28:12 server id 1882073306 end_log_pos 120 CRC32 0x6c11777a Start: binlog v 4, server v 5.6.23-72.1-log created 170809 16:28:12
# Warning: this binlog is either in use or was not closed properly.
# at 120
#170809 16:28:51 server id 1882073306 end_log_pos 192 CRC32 0x256a9f3c Query thread_id=78 exec_time=0 error_code=0
SET TIMESTAMP=1502267331/*!*/;
SET @@session.pseudo_thread_id=78/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1073741824/*!*/;
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 192
#170809 16:28:51 server id 1882073306 end_log_pos 246 CRC32 0x285d8d5d Table_map: `db1`.`t2` mapped to number 395
# at 246
#170809 16:28:51 server id 1882073306 end_log_pos 366 CRC32 0xb84daa2e Update_rows: table id 395 flags: STMT_END_F
### UPDATE `db1`.`t2`
### WHERE
### @1=105 /* INT meta=0 nullable=0 is_null=0 */
### @2='haha' /* VARSTRING(90) meta=90 nullable=0 is_null=0 */
### @3='57747ab889255af96b48d65e505382' /* VARSTRING(90) meta=90 nullable=0 is_null=0 */
### @4='' /* VARSTRING(72) meta=72 nullable=0 is_null=0 */
### @5=NULL /* VARSTRING(72) meta=0 nullable=1 is_null=1 */
### SET
### @1=105 /* INT meta=0 nullable=0 is_null=0 */
### @2='hehe' /* VARSTRING(90) meta=90 nullable=0 is_null=0 */
### @3='57747ab889255af96b48d65e505382' /* VARSTRING(90) meta=90 nullable=0 is_null=0 */
### @4='' /* VARSTRING(72) meta=72 nullable=0 is_null=0 */
### @5=NULL /* VARSTRING(72) meta=0 nullable=1 is_null=1 */
# at 366
#170809 16:28:51 server id 1882073306 end_log_pos 397 CRC32 0x74a5b1df Xid = 32558
COMMIT/*!*/;
# at 397
#170809 16:29:07 server id 1882073306 end_log_pos 468 CRC32 0x66079b66 Query thread_id=78 exec_time=0 error_code=0
SET TIMESTAMP=1502267347/*!*/;
BEGIN
/*!*/;
# at 468
# at 519
# at 567
#170809 16:29:07 server id 1882073306 end_log_pos 598 CRC32 0xb3ffd246 Xid = 32583
COMMIT/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
(END)
binlog_format不同模式下,对mysqlbinlog恢复的影响的更多相关文章
- CentOS下利用mysqlbinlog恢复MySQL数据库
如果不小心对数据库进行误操作,而又没有及时备份怎么办?这恐怕是广大的coder经常遇到的一类问题.我今天就因为不小心删除了某个数据库,但最后的备份是1个礼拜前的,唯一能解决的办法就是通过mysqlbi ...
- 使用 “恢复模式” 或 “DFU 模式” 来更新和恢复 iOS 固件
请访问原文链接:https://sysin.org/article/apple-ios-dfu/,查看最新版.原创作品,转载请保留出处. 作者:gc(at)sysin.org,主页:www.sysin ...
- Oracle在归档模式下恢复
=============== 数据库的完全恢复 =============== 在归档模式下数据库完全恢复时,数据库所经过的状态如下: 1.利用备份修复(Restores)损坏或丢失的数据文件,即将 ...
- 非归档模式下使用Rman进行备份和恢复
实验环境: 一.首先进行全库数据备份: 在非归档模式下,rman备份需要在mount模式下进行 SQL> select status from v$instance; STATUS ------ ...
- sql server 备份与恢复系列三 简单恢复模式下的备份与还原
一.概述 前面讲了备份的一些理论知识,这篇开始讲在简单恢复模式下的备份与还原.在简单模式下是不能做日志备份的,发生灾难后,数据库最后一次备份之后做的数据修改将是全部丢失的,所以在生产环境下,数据又很重 ...
- 使用alter database datafile 'XXX' offline drop 是否能够恢复(非归档模式下)
今天在群里面听到一位网友在说使用了alter database datafile 'XXX' offline drop命令是否能够恢复数据,在非归档模式下,下面是用一个实验来验证一下 ######## ...
- oracle非归档模式下的冷备份和恢复
查看归档的相关信息 SQL> archive log list数据库日志模式 非存档模式自动存档 禁用存档终点 USE_DB ...
- 浅谈SQL Server中的事务日志(四)----在完整恢复模式下日志的角色
简介 生产环境下的数据是如果可以写在资产负债表上的话,我想这个资产所占的数额一定不会小.而墨菲定律(事情如果有变坏的可能,无论这种可能性有多小,它总会发生)仿佛是给DBA量身定做的.在上篇文章介绍的简 ...
- 浅谈SQL Server中的事务日志(三)----在简单恢复模式下日志的角色
简介 在简单恢复模式下,日志文件的作用仅仅是保证了SQL Server事务的ACID属性.并不承担具体的恢复数据的角色.正如”简单”这个词的字面意思一样,数据的备份和恢复仅仅是依赖于手动备份和恢复.在 ...
随机推荐
- Effective C++ Item 41 了解隐式接口和编译期多态
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie 经验:class 和 templates 都支持接口和多态. 对 classes 而言接口是 ...
- ubuntu11.04 编译ffmpeg2.7 并生成 ffplay进行流媒体測试
源代码安装方式: 1. 先下载ffmpeg 安装包 到官网上 http://ffmpeg.org/download.html#releases 下载.选择Download gzip tarball. ...
- Cracking the Coding Interview 150题(二)
3.栈与队列 3.1 描述如何只用一个数组来实现三个栈. 3.2 请设计一个栈,除pop与push方法,还支持min方法,可返回栈元素中的最小值.pop.push和min三个方法的时间复杂度必须为O( ...
- 32位win7系统下配置IIS遇到php-cgi.exe - FastCGI 进程意外退出问题的解决的方法
今天重装了一下系统,是32位的WIN7.装完系统后想把IIS装回来,由于有时候须要用到笔记本处理一些事情.结果WEBserver正常了.但IIS的FASTCGI模块始终不能解析PHP,一直报php-c ...
- Thinking in Java---多线程仿真:银行出纳员仿真+饭店仿真+汽车装配工厂仿真
多线程一个非常有意思的作用就是用于仿真,这篇博客就会结合几个仿真实例来综合运用一下前面所学的多线程并发知识. 一.银行出纳员仿真 问题描写叙述:银行会有非常多来办业务的顾客,他们会排队等待服务:对于银 ...
- Maven手工安装jar包到本地仓库
使用maven,少不了的就是要被"包下载失败"这种问题折腾. jar包下载失败后.我们选择手工把jar下载下来.(能够下载到指定jar的途经非常多) 以下随便找了一个jar包为例. ...
- Android基础新手教程——4.1.1 Activity初学乍练
Android基础新手教程--4.1.1 Activity初学乍练 标签(空格分隔): Android基础新手教程 本节引言: 本节開始解说Android的四大组件之中的一个的Activity(活动) ...
- web 开发之js---js 多线程编程
AJAX 开发中的难题 试试多线程编程 想了解更多 有关作者 转载注明出处:http://www.infoq.com/cn/articles/js_multithread 虽然有越来越多的网站在应 ...
- 逆向碰到3des分析
1.ios 某个app碰到涉及3des的解密函数. 2.底层调用的库函数. 3.对比CCCrypt的头文件 CCCryptorStatus CCCrypt( CCOperation op, /* kC ...
- 2016/1/22 3,将id为005的对象从集合中移除
package shuzu; public class Emp { private String id; private String name; public Emp(String id, Stri ...