因为使用过程中出现程序执行的SQL和tidb反馈的执行结果完全不等的情况,需要抓取tidb接收到的sql语句网络包进行分析。使用Tshark时按抓取mysql包的方式抓取不到任何数据。
tshark -s 65536 -n -i eth0 -f ‘tcp dst port 4000’ -R ‘mysql matches “select|SELECT|delete|DELETE|Delete|UPDATE|update|Update|insert|INSERT|Insert”’ -T fields -e ip.addr -e tcp.port -e frame.time -e mysql.user -e mysql.query