MySQL状态变量Aborted_connects与Aborted_clients浅析

匿名 (未验证) 提交于 2019-12-02 22:06:11

Aborted Connect

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 attempts to access a database but has no privileges for it.

A client uses an incorrect password.

A connection packet does not contain the right information.

Aborted Clients

If a client successfully connects but later disconnects improperly or is terminated, the server increments the Aborted_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 program ended abruptly in the middle of a data transfer.

Other reasons for problems with aborted connections or aborted clients:

Use of Ethernet protocol with Linux, both half and full duplex. Some Linux Ethernet drivers have this bug. You should test for this bug by transferring a huge file using FTP between the client and server machines. If a transfer goes in burst-pause-burst-pause mode, you are experiencing a Linux duplex syndrome. Switch the duplex mode for both your network card and hub/switch to either full duplex or to half duplex and test the results to determine the best setting.

A problem with the thread library that causes interrupts on reads.

Badly configured TCP/IP.

Faulty Ethernets, hubs, switches, cables, and so forth. This can be diagnosed properly only by replacing hardware.

mysql> flush status;
Query OK, 0 rows affected (0.01 sec)
+------------------+-------+
+------------------+-------+
+------------------+-------+
mysql> 
+-------------------------------+-----------+
+-------------------------------+-----------+
+-------------------------------+-----------+

Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
+------------------+-------+
+------------------+-------+
+------------------+-------+

A client uses an incorrect password)

[root@DB-Server ~]# mysql -u test -p

Enter password:

ERROR 1045 (28000): Access denied for user 'test'@'localhost' (using password: YES)

[root@DB-Server ~]#

+------------------+-------+
+------------------+-------+
+------------------+-------+

mysql> flush status;
 Query OK, 0 rows affected (0.00 sec)
+------------------+-------+
+------------------+-------+
+------------------+-------+

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!