嘻嘻哈哈的部落格(blog) ? 用tcpdump抓mysql的查询语句
来源:百度文库 编辑:神马文学网 时间:2024/04/28 13:42:33
用tcpdump抓mysql的查询语句
2008年1月21日 哈哈 发表评论 阅读评论在mysql的官方网站上找到几个用tcpdump来抓在mysql server上跑的sql语句
# — (1.1) To capture all traffic on the interface eth0, run:
time tcpdump -i eth0 -s 1500 -w 20060427-db-traffic-01.dmp
# — (1.2) To capture traffic on the interface eth0 coming from a specific IP address, run:
time tcpdump -i eth0 -s 1500 src host 192.168.2.10 -w 20060427-db-traffic-01.dmp
# — Press Ctrl+C — do not leave tcpdump running infinitely on high traffic interfaces
# — (2) To process the results, run:
strings 20060427-db-traffic-01.dmp | grep -i ’select’ | awk ‘{printf(”%s %s %s %s\n”, $1,$2,$3, $4);}’| sort| uniq -c | awk ‘{printf(”%06ld %s %s %s %s\n”, $1,$2,$3,$4,$5);}’|sort
还有一句诗:
tcpdump -l -i eth0 -w - src or dst port 3306 | strings
嘻嘻哈哈的部落格(blog) ? 用tcpdump抓mysql的查询语句
嘻嘻哈哈的部落格(blog) ? bash-prompt-screen
嘻嘻哈哈的部落格(blog) ? 用squid2.6反向加速多个web网站
嘻嘻哈哈的部落格(blog) ? 怎样同时在n个SecureCRT的session上执行命...
嘻嘻哈哈的部落格(blog) ? 在shell程序中用vim删除掉文件的最后一行
嘻嘻哈哈的部落格(blog) ? 在文件中添加2行
MySql 的查询语句中有没有Datepart函数?
两种设置MYSQL查询编码的PHP语句
安全带的来历 | 嘻嘻哈哈
检测mysql中sql语句的效率
ReViSion的专栏 - 数据库查询语句
部落客(blog)的第一印象
提高MySQL查询效率的三个技巧(3)
mysql的子查询实际用途 - MySQL语法 - PHP信息研究中心
手太阳小肠经穴位 - 嘻嘻哈哈的日志 - 网易博客
Paxton的部落格
部落格的作用
用Tcpdump过滤数据包
关于SQL Server SQL语句查询分页数据的解决方案
MySQL分表实现上百万上千万记录分布存储的批量查询设计模式
~~嘻嘻哈哈~~
MySQL查询优化技术讲座
mysql like 查询问题
46条经典伤感爱情语句11--qqai的blog