Add a description of the mysql permissions

This commit is contained in:
zhaochengyong 2016-12-16 12:27:15 +08:00
parent d69469043c
commit 6c407d38d4
1 changed files with 9 additions and 0 deletions

View File

@ -39,6 +39,14 @@ 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 +63,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
输出: