1. 程式人生 > >MySQL抓包工具

MySQL抓包工具

 1 [email protected]:~# mysql-sniffer -h
 2 Usage mysql-sniffer [-d] -i eth0 -p 3306,3307,3308 -l /var/log/mysql-sniffer/ -e stderr
 3          [-d] -i eth0 -r 3000-4000
 4          -d daemon mode. #
 5          -s how often to split the log file(minute, eg. 1440). if less than 0, split log everyday
 6          -i interface. Default to eth0 #網絡卡名
7 -p port, default to 3306. Multiple ports should be splited by ','. eg. 3306,3307 8 this option has no effect when -f is set. #埠,多個埠,分割,不能和-f一起使用 9 -r port range, Don't use -r and -p at the same time #埠範圍,不能和-p一起使用 10 -l query log DIRECTORY. Make sure that the directory is accessible. Default to stdout. #輸出列印到檔案
11 -e error log FILENAME or 'stderr'. if set to /dev/null, runtime error will not be recorded 12 -f filename. use pcap file instead capturing the network interface 13 -w white list. dont capture the port. Multiple ports should be splited by ','.#排除的埠 14 -t truncation length. truncate long
query if it's longer than specified length. Less than 0 means no truncation #擷取制定長度的SQL 15 -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 #指定資料包個數