Add a description of the mysql permissions
This commit is contained in:
parent
d69469043c
commit
6c407d38d4
|
@ -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
|
||||
|
||||
输出:
|
||||
|
|
Loading…
Reference in New Issue