MySQL ERROR Got an error reading communication packets
200 ? "200px" : this.width)!important;}
-->
介绍
经常会在错误日志中看到这个报错,首先我们可以从show GLOBAL status like '%Aborte%';里面看看两种错误连接的数量,以下是复制官方文档的解释。
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 has no privileges for it.
A client uses an incorrect password.
A connection packet does not contain the right information.
It takes more than
connect_timeoutseconds to obtain a connect packet. See Section 5.1.4, “Server System Variables”.
If these kinds of things happen, it might indicate that someone is trying to break into your server! If the general query log is enabled, messages for these types of problems are logged to it.
对于Aborted_connects错误的大概原因有:
1.客户端连接一个没有授权的数据库
2.密码错误
3.连接包信息错误
4.连接超时(默认10s)
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 had been sleeping more than
wait_timeoutorinteractive_timeoutseconds 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 for problems with aborted connections or aborted clients:
The
max_allowed_packetvariable value is too small or queries require more memory than you have 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 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.
对于 Aborted_clients的原因大概有:
1.客户端没有执行mysql_close()关闭
2.由于连接一直没有关闭导致时间超过wait_timeout or interactive_timeout这两个变量的值(这两个变量的超时时间是8小时)
3.客户端在程序执行过程中结束
4.max_allowed_packet包设的过小
5.网络原因
6.线程bug等
总结
|
备注: 作者:pursuer.chen 博客:http://www.cnblogs.com/chenmh 本站点所有随笔都是原创,欢迎大家转载;但转载时必须注明文章来源,且在文章开头明显处给明链接。 《欢迎交流讨论》 |
MySQL ERROR Got an error reading communication packets的更多相关文章
- 解决mysql日志显示时间和“Got an error reading communication packets” 问题
[root@calldb3 data]# tail -f mysql.error :.884160Z to db: 'calldb' user: 'call' host: '172.31.50.220 ...
- MySQL错误日志显示(Got an error reading communication packets)的问题
错误显示: 2019-05-28T12:54:08.267934+08:00 820396 [Note] Aborted connection 820396 to db: 'Databaseplatf ...
- mysql5.7日志时间戳(log_timestmaps)与系统时间不一致问题以及日志报Got an error reading communication packets情况分析
一.mysql安装后error_log日志时间戳默认为UTC(如下图),因此会造成与系统时间不一致,与北京时间相差8个小时. 解决errro_logs时间戳与linux系统时间不一致问题 step1: ...
- Got timeout reading communication packets解决方法
Got timeout reading communication packets解决方法 http://www.th7.cn/db/mysql/201702/225243.shtml [Note] ...
- Aborted connection 1055898 to db: 'xxx' user: 'yyy' host: 'xxx.xxx.xxx.xxx' (Got timeout reading communication packets)
mysql错误日志中,发现大量以下类似信息:(mysql 5.7.18) [Note] Aborted connection 1055898 to db: 'xxx' user: 'yyy' host ...
- 翻译:MySQL "Got an Error Reading Communication Packet" Errors
前言: 本文是对Muhammad Irfan的这篇博客MySQL "Got an Error Reading Communication Packet" Errors的翻译,如有翻 ...
- ERROR 2013 (HY000): Lost connection to MySQL server at 'waiting for initial communication packet', system error: 2
ERROR (HY000): Lost connection to MySQL server at 'waiting for initial communication packet', system ...
- 使用cmd命令登录mysql数据库时报2013-Lost connection to MYSQL server at 'waiting for initial communication packet',system error:0
[错误内容]:SQL Error (2013): Lost connection to MySQL server at 'waiting for initial communication packe ...
- 问题MySQL Error (2013): Lost connection to MySQL server at waiting for initial communication packet
错误说明: SQL Error (2013): Lost connection to MySQL server at 'waiting for initial communication packet ...
随机推荐
- csu 1600: Twenty-four point
传送门 1600: Twenty-four point Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 490 Solved: 78[Submit][S ...
- msp430项目编程22
msp430中项目---充电控制系统 1.定时器工作原理 2.电路原理说明 3.代码(显示部分) 4.代码(功能实现) 5.项目总结 msp430项目编程 msp430入门学习
- Go --- 设计模式(模板模式)
模版模式真的是一个好东西.所谓模版模式,就是说,某几个类中相同的操作和代码提取到父类的一个函数中,并定义相同的操作为抽象函数.由子类来实现.估计我也没表达清楚,下面还是看代码来讲解吧. 例:我们有两个 ...
- Ajax系列之四:问题总结
1.最经典的就是ie下的缓存问题了. 假设使用的是get.那么在ie下出现缓存问题.导致代码仅仅运行一次. 解决的方法就是加时间戳或者随机数,使url变为唯一,这样就不会出现ie 下的缓存问题了, ...
- Android消息机制1-Handler(Java层)(转)
转自:http://gityuan.com/2015/12/26/handler-message-framework/ 相关源码 framework/base/core/java/andorid/os ...
- Nginx在Linux下的安装部署
Nginx简单介绍 Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 server,也是一个 IMAP/POP3/SMTP server.Nginx作为 ...
- fedora下安装xdot和objgraph
前提:安装好了python 1.先下载xdot-0.6.tar.gz和objgraph-1.8.0-py27-none-any.whl,你也可以在官网上下载其他版本. 2.下载完后,解压. 3.打开终 ...
- 【Mongodb教程 第八课 】MongoDB 更新文档
MongoDB的 update() 和 save() 方法用于更新文档的集合. update()方法更新现有的文档值,而替换现有的文档通过的文件中 save() 方法. MongoDB Update( ...
- Android碎纸机效果
1.总体思想 活用padding和margin 2.实现过程 public class PopupShredderView extends FrameLayout{ public PopupShred ...
- Eclipse+Maven(webapp)+Jetty+JReBel的配置方法
maven配置 省略 jrebel配置 jrebel毋须繁琐的配置,把jrebel-5.6.3-crack.zip解压放在磁盘文件夹就可以.(笔者路径为:D:\coding-life\IDE\jreb ...