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_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 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_timeout
orinteractive_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 for problems with aborted connections or aborted clients:
The
max_allowed_packet
variable 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 ...
随机推荐
- Netty 4.0 新的特性及需要注意的地方
Netty 4.0 新的特性及需要注意的地方 这篇文章和你一起过下Netty的主发行版本的一些显著的改变和新特性,让你在把你的应用程序转换到新版本的时候有个概念. 项目结构改变 Netty的包名从or ...
- 11-Js类和对象
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- spring boot + redis 实现session共享
这次带来的是spring boot + redis 实现session共享的教程. 在spring boot的文档中,告诉我们添加@EnableRedisHttpSession来开启spring se ...
- cmd的操作命令导出导入.dmp文件
利用cmd的操作命令导出,详情如下(备注:方法二是转载网上的教程): 1:G:\Oracle\product\10.1.0\Client_1\NETWORK\ADMIN目录下有个tnsname.ora ...
- xml文件的schema也是经过jdk编译器编译的,如果xsd没引入完整,而xml中又用到了这些标签,就会编译不通过啊。
1.xml文件的schema也是经过jdk编译器编译的,如果xsd没引入完整,而xml中又用到了这些标签,就会编译不通过啊. 2.java编译器会下载xsd的指定链接文件,加在代码里,一起编译
- dnsmasq possible DNS-rebind attack detected错误
最近在做openwrt的平台,dns使用的是dnsmasq,但是通过板子上网,将PC的dns设置成板子的时候,发现百度等都可以,但是公司邮箱打不开.公司邮箱的域名 xx-xx-notes.xxx.co ...
- Android从无知到有知——NO.6
紧随上一篇,说一下创建ip拨号器过程中出现的一些问题. 1)在一開始监听外拨电话的时候会报这样一个警告: Permission Denial: receiving Intent { act=andro ...
- AES算法加密java实现
package cn.itcast.coderUtils; import java.security.Key; import javax.crypto.Cipher; import javax.cry ...
- 3 微信开发本地代理环境的搭建--实现将内网ip映射到外网
微信公众号的开发,要搭建网站,并且随时都有可能修改网站内容进行调试,这就需要临时外网能返回本地开发环境搭建的项目进行测试,即内网映射到公网,但是好多开发者没有自己的域名和服务器,这里我们先来搭建一个本 ...
- [IT学习]从网上获取pdf制作vce文件
考过IT证书的朋友,都知道什么是vce文件.如果仅仅找到了pdf版本的文件,该如何转为vce文件呢? 具体的步骤如下: 1.到如下网址下载examformatter,http://www.examco ...