Press "Enter" to skip to content

MySQL状态变量Aborted_connects与Aborted_clients浅析

Aborted Connect

Aborted Connect表示尝试连接到MySQL服务器失败的次数。这个状态变量可以结合host_cache表和其错误日志一起来分析问题。 引起这个状态变量激增的原因如下:

1、客户端没有权限但是尝试访问MySQL数据库
2、客户端输入的密码有误
3、连接数据包不包含正确的信息
4、超过连接时间限制,主要是这个系统变量connect_timeout控制(mysql默认是10s,基本上,除非网络环境极端不好,一般不会超时。)

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:

1.A client attempts to access a database but has no privileges for it.

2.A client uses an incorrect password.

3.A connection packet does not contain the right information.

4. It takes more than connect_timeout seconds to obtain a connect packet. See Section 5.1.7, “Server System Variables”.

官方说明

Aborted Clients

Aborted Clients表示由于客户端没有正确关闭连接而中止的连接数。

1、 客户端程序在退出之前未调用mysql_close()正确关闭MySQL连接
2、 客户端休眠的时间超过了系统变量wait_timeout和interactive_timeout的值,导致连接被MySQL进程终止
3、 客户端程序在数据传输过程中突然结束

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

2.The client had been sleeping more than wait_timeout or interactive_timeout seconds without issuing any requests to the server. See Section 5.1.7, “Server System Variables”.

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

官方解释

参考: https://www.cnblogs.com/kerrycode/p/9206787.html

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Captcha Code