MySQL error Got An error reading communication packets

Source: Internet
Author: User

Introduction

You will often see this error in the errors log and copy the explanation of the official documentation.

Aborted_connects

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 have no privileges for it.

    • A client uses an incorrect password.

    • A connection packet does not contain the right information.

    • It takes more than connect_timeout seconds to obtain a connect packet. See section 5.1.4, "Server System Variables".

If These kinds of things happen, it might indicate that someone was trying to break into your server! If The General query log was enabled, messages for these types of problems was logged to it.

ForAborted_connects错误的大概原因有:客户端连接一个没有授权的数据库、密码错误、连接包信息错误、连接超时(默认10s)

Aborted_clients

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

    • The client program has not been 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. See section 5.1.4, "Server System Variables".

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

Other reasons-problems with aborted connections or aborted clients:

  • The max_allowed_packet variable value is too small, or queries require more memory than, which has allocated for mysqld. See section b.5.2.10, "Packet Too Large".

  • Use of Ethernet protocol with Linux, both half and full duplex. Some Linux Ethernet Drivers has 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 is 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 ResU LTS to determine, the best setting.

  • A problem with the thread library is causes interrupts on reads.

  • Badly configured TCP/IP.

  • Faulty ethernets, hubs, switches, cables, and so forth. This can is diagnosed properly only by replacing hardware.

The reason for this is Aborted_clients that the client does not perform mysql_close () shutdown, because the connection has not been closed causing time to exceed wait_timeout or interactive_timeout这两个变量的值(这两个变量的超时时间是8小时)、客户端在程序执行过程中结束、max_allowed_packet包设的过小、网络原因、线程bug等

Summary

 

Note:

pursuer.chen

Blog:http://www.cnblogs.com/chenmh

This site all the essays are original, welcome to reprint, but reprint must indicate the source of the article, and at the beginning of the article clearly give the link.

Welcome to the exchange of discussions

MySQL error Got An error reading communication packets

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.