Merge pull request #4 from imzcy1987/master

增加权限说明。重要说明,详细论述见 #2
This commit is contained in:
Cao Danfeng 2016-12-16 16:20:24 +08:00 committed by GitHub
commit 3747167939
1 changed files with 10 additions and 0 deletions

View File

@ -39,6 +39,15 @@ shell> pip install -r requirements.txt
max_binlog_size = 100M
binlog-format = row
### 需要给client端赋予的最小权限集合
select, super/replication client, replication slave
**权限说明:**
select需要读取server端的information_schema.COLUMNS表获取表结构的元信息拼接成可视化的sql语句
super/replication client两个权限都可以需要执行'SHOW MASTER STATUS', 获取server端的binlog列表
replication slave通过BINLOG_DUMP协议获取binlog内容的权限
###基本用法
**解析出标准SQL**
@ -55,6 +64,7 @@ DELETE FROM `test`.`test3` WHERE `addtime`='2016-12-10 13:03:38' AND `data`='eng
**解析出回滚SQL**
```bash
shell> python binlog2sql.py --flashback -h127.0.0.1 -P3306 -uadmin -p'admin' -dtest -ttest3 --start-file='mysql-bin.000002' --start-pos=763 --end-pos=1147
输出: