Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: mysql-replay 工具有在线回放demo么

[TiDB Usage Environment] Test
[TiDB Version] 5.0.4
[Encountered Issue: Problem Phenomenon and Impact]
The testing tool has an online replay function, but all the methods tested failed.
Steps are as follows:
- Start tcpdump to collect data
nohup tcpdump -nn -B 1572864 -w /data/dump_pcap_data/data.%s.pcap -Z root -G 60 -i <network-interface> tcp port 4000 1> main.log 2>&1 &
- Start mysql-replay serve
mysql-replay serve --addr :5000 --ports 4000 --target-dsn 'root@tcp(192.168.8.13:4000)/test?charset=utf8mb4&sql_mode=NO_AUTO_VALUE_ON_ZERO' --archive-dir=/data/dump_pcap_data --speed 1
- Start notify to inform about traffic replay: Error reported
mysql-replay notify --callback-url "http://127.0.0.1:5000/requests" --channel "centos1" --download-url "http" --log-level debug
Error: accepts 1 arg(s), received 0
Usage:
mysql-replay notify [flags]
Flags:
--callback-url string callback url (default "http://127.0.0.1:5000/requests")
--channel string tcpdump channel (default "centos1")
--download-url string download url format
-h, --help help for notify
Global Flags:
--log-level string log level (default "info")
--log-output strings log output (default [stderr])
--pprof string enable pprof
Checked the source code but didn’t find any demo, and the community explanation is somewhat vague: mysql-replay复制mysql流量到Tidb6.X - #6,来自 TammyLi - TiDB 的问答社区