File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,12 @@ categories:
7
7
tags :
8
8
- mysql常用命令
9
9
---
10
+ 目录:
11
+ * awsl
12
+ {: toc }
10
13
11
14
15
+ ### mysql常用命令
12
16
- 看所有线程:` show full processlist; `
13
17
- 杀死进程: ` kill 60882 ; `
14
18
- 查看当前未提交的事务: ` select * from information_schema.innodb_trx; `
20
24
- 查看binlog:` show binary logs; `
21
25
- 查看binlog日志路径:` show variables like 'log_%'; `
22
26
- 解析binlog:` mysqlbinlog --no-defaults -d databasename --start-datetime="2017-09-17 07:21:09" --stop-datetime="2017-09-19 07:59:50" mysql-bin.000002 `
27
+
28
+
29
+ ### my2sql binlog日志解析
30
+ ``` sql
31
+ # 解析本地binlog,指定数据库在指定日期范围内执行的sql
32
+ ./ my2sql - user root - password ' 2vKeG&1.3' - host 127 .0 .0 .1 - port 7501 - databases db_transfer - mode file - local- binlog- file ./ binlog .000009 - start- datetime " 2023-08-04 09:20:00" - stop- datetime " 2023-08-04 09:50:00" - start- file binlog .000009 - work- type 2sql - output- dir ./ tmpdir
33
+
34
+ # 解析本地binlog,指定数据库在指定日期范围内执行的sql,并生成回滚sql
35
+ ./ my2sql - user root - password ' 2vKeG&1.3' - host 127 .0 .0 .1 - port 7501 - databases db_transfer - mode file - local- binlog- file ./ binlog .000009 - start- datetime " 2023-08-04 09:20:00" - stop- datetime " 2023-08-04 09:50:00" - start- file binlog .000009 - work- type rollback - output- dir ./ tmpdir
36
+ ```
You can’t perform that action at this time.
0 commit comments