专栏名称: 运维帮
互联网技术分享平台,分享的力量。帮主一直坚信技术可以改变世界,从毕业到现在干了15年运维,有许多话要和你说。
目录
相关文章推荐
运维  ·  最近,后端的薪资彻底爆了。。。 ·  昨天  
运维  ·  B 站崩了 ·  2 天前  
51好读  ›  专栏  ›  运维帮

MySQL抓包工具:MySQL Sniffer

运维帮  · 公众号  · 运维  · 2017-03-03 10:44

正文

请到「今天看啥」查看全文


Multiple ports should be splited by ',' . eg . 3306 , 3307

  • this option has no effect when - f is set .

  • - r port range , Don 't use -r and -p at the same time

  • -l query log DIRECTORY. Make sure that the directory is accessible. Default to stdout.

  • -e error log FILENAME or ' stderr '. if set to /dev/null, runtime error will not be recorded

  • -f filename. use pcap file instead capturing the network interface

  • -w white list. dont capture the port. Multiple ports should be splited by ' , '.

  • -t truncation length. truncate long query if it' s longer than specified length . Less than 0 means no truncation

  • - n keeping tcp stream count , if not set , default is 65536. if active tcp count is larger than the specified count , mysql - sniffer will remove the oldest one

  • 示例

    1. 实时抓取某端口信息并打印到屏幕

    输出格式为:时间,访问用户,来源 IP,访问 Database,命令耗时,返回数据行数,执行语句。

    1. mysql-sniffer -i eth0 -p 3306

    2. 2017-02-23 14:47:45     testuser    10.xx







    请到「今天看啥」查看全文