???????mysql??????????????????????????????????????SQL???????????????mysql??????????????C-API??JDBC????????????????????????????????????????mysql?????????????????漰client??server????????????tcpdump???????????????????
????TCP????Э??
????????????????mysql????TCPЭ???????????????????????TCP??3???????mysql server????????????????client???? client?????????????????sync???????????????????ack???????????sync????????????????sync?????????? ????????????ack????????????????????3???????TCP???????????????????????????mysql????????????????? ???????á??????TCP??3???????????TCP??Э?????????ó??????????????????????????mysql?????????????? ?????--????TCP?????
???????渽??TCP??????????????????????

????MYSQL????Э??
????TCP????????????mysql???????mysql???????????????????mysql????????(1)??????????????????????????(2)??????????????????????(????????????)??(3)????????????????????????????????????????????????????????????????????????????????????????????????????????????show processlist????User????unauthenticated user ????????????????????????1?????2??????????????????????????????С?
????15922528       unauthenticated user   10.xx.2.74:53216 NULL   Connect NULL   Reading from net       NULL
????15923418       unauthenticated user   connecting host NULL   Connect NULL   login   NULL
????tcpdump??????
???????????????tcpdump??????????????????????????????????????н??У??????????????ε?IPй?????IP?????滻????????????????????????? 10.aa.zz.142.10556?????????10.bb.yy.104.3306????????????3306??????????????????
????(1).?????????tcpdump??????????10.bb.yy.104.3306???????????????????£?
????tcpdump -S -nn -tttt -i eth0 host 10.bb.yy.104 and port 3306 and tcp -c 100
????-S ??tcp?????к????????????????????????
????-nn ?????ж????????????
????-tttt ?????????????date??????????????????
????-i eth0 ???????????????
????host 10.bb.yy.104 and port 3306  ???ü???10.bb.yy.104:3306???????
????-c 100 ???????100????????
????(2).?????????????mysql???????????????10.bb.yy.104??
????mysql –h10.bb.yy.104 –P3306 –uxxx –pxxx
?????????????????????exit?????
????(3)????tcpdump?????????????????????TCP?????MYSQL?????TCP?????????????????????е?1??????TCP???????????????2??????MYSQL???????????3????????????????????????????????????4??????????????????????е?????????????????????TCP?????????3???????MYSQL??????TCP????????4?λ???????

????????????
????????????????????????????????10.aa.zz.142.10556??????????????1491894492??SYN????????????????????1491894492+1??ACK???????????????2727774925??SYN??????????????????2727774925+1??????????