玩玩TCPCOPY+ intercept+mysql-replay-module(未成功)
TCPCOPY+ intercept这两个模拟流量转发倒简单。
但,想实现一个mysql-replay-module模块时,失败了。(我现在仔细想想,这个方案,在我们现在的场景里,实用性不大,但弄好点专业些。)
https://github.com/session-replay-tools/mysql-replay-module
https://github.com/session-replay-tools/tcpcopy
安装=================================
一,在assistant server上安装intercept:
- git clone git://github.com/session-replay-tools/intercept.git
- cd intercept
- ./configure --with-resp-payload
- make
- make install
二,在ONLINE SERVER上安装TCPCOPY:
- git clone git://github.com/session-replay-tools/tcpcopy.git
- cd tcpcopy
- git clone git://github.com/session-replay-tools/mysql-replay-module.git
- ./configure --set-protocol-module=mysql-replay-module
- make
- make install
配置====================================
一,在TARGET SERVER上配置路由:
For example:
Assume 10.110.12.18 is the IP address of the assistant server and
10.110.12.15 is the MySQL client IP address. We set the following route
command to route all responses to the 10.110.12.15 to the assistant server.
route add -host 10.110.12.15 gw 10.110.12.18
二,在assistant server上配置端口过滤:
For example:
./intercept -i eth0 -F 'tcp and src port 3306' -d
intercept will capture response packets of the TCP based application which
listens on port 3306 from device eth0
三,在ONLINE SERVER上启动TCPCOPY:
a) set user password pair in conf/plugin.conf in the installion directory
Format:
user user1@password1,user2@password2,...,userN@passwordN;
For example:
user root@123456;
b) start tcpcopy
./tcpcopy -x localServerPort-targetServerIP:targetServerPort -s <intercept server,>
For example(assume 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 would capture MySQL packets(assume MySQL listens on 3306 port) on current
server, do the necessary modifications and send these packets to the target port
'3306' on '10.110.12.17'(the target MySQL), and connect 10.110.12.18 for asking
intercept to pass response packets to it.
最后,一份转两份,真实服务器上有,测试服务器上也有流量。用过压力或冒烟测试,蛮好的。

玩玩TCPCOPY+ intercept+mysql-replay-module(未成功)的更多相关文章
- 【原创】MySQL Replay线上流量压测工具
一. 背景 去年做过一次mysql trace 重放的测试,由于performance schema本身采集样本的长度等限制,实际回放的成功率比较低. 最近找到一款开源的工具,基于TCPCopy实现了 ...
- PS2鼠标+LCD12864实验(调试未成功)
此试验我一人调试许久都未成功,但发送ff时,读出来的数据确是对的,一开始让我窃喜,但发送f4时,读出来的数据确是错的,哎让苦恼啊,能力有限,只能先暂时就这样吧,那位什么还要贴出来呢,有两个原因: 1. ...
- Eclipse + Apache Axis2 发布RESTful WebService(三)第一个程序Hello Axis2 !(未成功)
此路不通 Axis2发布SOAP WebService非常简单,建一个Dynamic Web Project,然后为它建一个Axis的Web Service(Tomcat7+JDK),就会生成Clas ...
- Mac安装HomeBridge适配小米Homekit报错:module未找到解决
Mac安装HomeBridge适配小米Homekit报错:module未找到 具体错误是: module.js:471 throw err; balabalal...... 问了一圈,终于解决,但是又 ...
- WebApi 数据保护操作未成功。这可能是由于未为当前线程的用户上下文加载用户配置文件导致的。当线程执行模拟时,可能会出现此情况。","ExceptionType":"System.Security.Cryptography.CryptographicException","StackTrace
在调用System.Security.Cryptography.ProtectedData.Protect方法来保护私密信息时,IIS可能会报以下错误:CryptographicException: ...
- git 取消未成功的 merge
git 取消未成功的 merge # 合并时遇到冲突想取消操作,恢复index $ git merge --abort # 可以回退到某个提交 $ git reset --hard # 可以撤销某个提 ...
- 解Bug之路-主从切换"未成功"?
解Bug之路-主从切换"未成功"? 前言 数据库主从切换是个非常有意思的话题.能够稳定的处理主从切换是保证业务连续性的必要条件.今天笔者就来讲讲主从切换过程中一个小小的问题. 故障 ...
- 在Ubuntu 16.10安装mysql workbench报未安装软件包 libpng12-0错误
1.安装mysql workbench,提示未安装软件包 libpng12-0 下载了MySQL Workbench 6.3.8 在安装的时候报错: -1ubu1604-amd64.deb 提示: ...
- luarocks错误 require ‘luasql.mysql' 报module 'luasql.mysql' not found:
错误: require 'luasql.mysql'stdin:1: module 'luasql.mysql' not found: no field package.preload['luasql ...
随机推荐
- Dubbo框架中的应用(两)--服务治理
Dubbo服务治理了看法 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbGlzaGVoZQ==/font/5a6L5L2T/fontsize/400/fi ...
- 自定义的插件如何加载到Qt Designer中(详细)
要想在Qt Designer中使用自定义控件,必须要使Qt Designer能够知道我们的自定义控件的存在.有两种方法可以把新自定义控件的信息通知给Qt Designer:“升级(promotion) ...
- android反编译经验谈
反编译这事,找对了工具其实非常简单. 反编译工具下载地址http://pan.baidu.com/s/1eQvshwu android的反编译要经过两个步骤: 1.把dex文件转为jar 2.jar转 ...
- linux中echo的用法 分类: 学习笔记 linux ubuntu 2015-07-14 14:27 21人阅读 评论(0) 收藏
1.echo命令我们常用的选项有两个,一个是-n,表示输出之后不换行,另外一个是-e,表示对于转义字符按相应的方式处理,如果不加-e那么对于转义字符会按普通字符处理. 2.echo输出时的转义字符 \ ...
- Java——(二)Java集合容器
------Java培训.Android培训.iOS培训..Net培训.期待与您交流! ------- 一.基本概念 1)Collection:一个独立元素的序列,这些元素都服从一条或多条规则.Lis ...
- C#使用框架,打开新选项卡
C#使用框架,打开新选项卡: --打开函数 function Open(text, url) { if ($("#tabs").tabs('exists', text ...
- PHP操作Oracle数据库
原文出处 (这是来自“百度文库”中的文章写得很不错) PHP操作Oracle数据库(OCI数据抽象层)OCI(Oracle 8 Call-Interface)是PHP中内置的数据库抽象层函数.下面针对 ...
- power desinger 学习笔记<六>
原帖地址:http://blog.csdn.net/spt110/article/details/8640849 PowerDesigner中Table视图同时显示Code和Name,像下图这样的效果 ...
- 文字排版--字体(font-family)
我们可以使用css样式为网页中的文字设置字体.字号.颜色等样式属性.下面我们来看一个例子,下面代码实现:为网页中的文字设置字体为宋体. body{font-family:"宋体"; ...
- JS特殊符号
反斜杠用来在文本字符串中插入省略号.换行符.引号和其他特殊字符. 代码 输出 \' 单引号 \" 双引号 \& 和号 \\ 反斜杠 \n 换行符 \r 回车符 \t 制表符 \b 退 ...