- Notifications
You must be signed in to change notification settings - Fork6
A tcpcopy module for replaying MySQL sessions with skip-grant-table enabled.
License
Unknown, Unknown licenses found
Licenses found
session-replay-tools/mysql-sgt-replay-module
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Themysql-sgt-replay-module is a TCPCopy extension designed to replay MySQL sessions, enabling realistic testing of MySQL applications.
For detailed information, please consultTCPCopy before proceeding.
- git clone git://github.com/session-replay-tools/intercept.git
- cd intercept
- ./configure
- make
- make install
- git clone git://github.com/session-replay-tools/tcpcopy.git
- cd tcpcopy
- git clone git://github.com/session-replay-tools/mysql-sgt-replay-module.git
- ./configure --set-protocol-module=mysql-sgt-replay-module
- make
- make install
a) Configure Routing to Direct Response Packets to the Assistant Server
For example, assuming10.110.12.18 is the IP address of the assistant server and10.110.12.15 is the MySQL client IP address, use the following route command to direct all responses from10.110.12.15 to the assistant server:
route add -host 10.110.12.15 gw 10.110.12.18
b) Start MySQL with--skip-grant-tables
./intercept -F <filter> -i <device>
Note that the filter format is the same as the pcap filter. For example:
./intercept -i eth0 -F 'tcp and src port 3306' -d
In this example,intercept will capture response packets from a TCP-based application listening on port 3306, using the eth0 network device.
Please note thatip_forward is not enabled on the assistant server.
./tcpcopy -x localServerPort-targetServerIP:targetServerPort -s <intercept server> [-c <ip range>]
For example (assuming 10.110.12.17 is the IP address of the target server):
./tcpcopy -x 3306-10.110.12.17:3306 -s 10.110.12.18
tcpcopy captures MySQL packets (assuming MySQL listens on port 3306) on the current server, modifies them as needed, and forwards them to port 3306 on10.110.12.17 (the target MySQL server). It also connects to10.110.12.18 to request thatintercept forwards the response packets to it.
- Only the complete sesssion could be replayed
- Currently, it does not support MySQL 8.0 yet.
- For additional assistance, visittcpcopy.
- 2017.03 v1.0 mysql-sgt-replay-module released
- 2024.09 v1.0 Open source fully uses English
Have a bug or a feature request?Please open a new issue. Before opening any issue, please search for existing issues.
Copyright 2024 underthe BSD license.
About
A tcpcopy module for replaying MySQL sessions with skip-grant-table enabled.
Topics
Resources
License
Unknown, Unknown licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors2
Uh oh!
There was an error while loading.Please reload this page.