Chinaunix首页 | 论坛 | 博客
  • 博客访问: 366294
  • 博文数量: 273
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1430
  • 用 户 组: 普通用户
  • 注册时间: 2018-02-02 15:57
文章分类

全部博文(273)

文章存档

2018年(273)

我的朋友

分类: Mysql/postgreSQL

2018-07-26 15:40:00

安装:

环境要求:

1binlog格式必须为row,且binlog_row_image=full

2仅支持5.65.7

3只能回滚DML(增、删、改)

4.  下载地址:

 

安装:


unzip MyFlash-master.zip

mv MyFlash-master /usr/local/MyFlash/

gcc -w  `pkg-config --cflags --libs glib-2.0` source/binlogParseGlib.c  -o binary/flashback


闪回:

 

update,情景描述,程序1误将xtr库下面的t2 12,11 更改后0,这是一个错误的操作;而后面的程序21314更改0了,这是一个正确的操作,需要闪回程序1的误操作。

模似上述场景:

原表:


mysql> select * from xtr.t2;

+------+

| id  |

+------+

|  12 |

|  11 |

|  4  |

|  3  |

|  13 |

|  14 |

+------+
6 rows in set (0.00 sec)


update操作:

update xtr.t2 set id = 0 where id = 12;

update xtr.t2 set id = 0 where id = 11;

update xtr.t2 set id = 0 where id = 13;

update xtr.t2 set id = 0 where id = 14;


DBA接到开发的报警后:

1flush logs;

需要闪回的动作所在的二进制文件,这个文件必须是稳定的,需要flush logs;

2、记录当前的binlog文件

3、解析binlog


阅读(1013) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~