Aborted_connects很高分析

来源:互联网 发布:q版形象设计软件 编辑:程序博客网 时间:2024/04/30 20:34
mysqladmin ext | grep Abort| Aborted_clients                | 44458        || Aborted_connects               | 546857        |

最近发现服务器这个两个值很高,没过几分钟就增长几十,查看手册

If a client successfully connects but later disconnects improperly or is terminated, the server increments theAborted_clients status variable, and logs an Aborted connection message to the error log. The cause can be any of the following:

  • The client program did not call mysql_close() before exiting.

  • The client had been sleeping more than wait_timeout or interactive_timeout seconds without issuing any requests to the server. SeeSection 5.1.4, “Server System Variables”.

  • The client program ended abruptly in the middle of a data transfer.

If a client is unable even to connect, the server increments the Aborted_connects status variable. Unsuccessful connection attempts can occur for the following reasons:

  • A client does not have privileges to connect to a database.

  • A client uses an incorrect password.

  • A connection packet does not contain the right information.

  • It takes more than connect_timeout seconds to get a connect packet. SeeSection 5.1.4, “Server System Variables”.

跟踪--使用tcpdump

tcpdump -s 1500 -w tcp.out port 3306
开另一个窗口,tail -f tcp.out | strings   可以看到有连接错误信息

strings tcp.out > tcp.txt
vim tcp.txt

可以看到具体的信息

Host 'XXX.XX.XX.XXX' is not allowed to connect to this MySQL serverAccess denied for user 'root'@'XXX.XX.XX.XXX' (using password: YES)0N
原创粉丝点击