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 ...
随机推荐
- Swift--Set的了解
1. 创建和初始化一个空的set var letters = Set<Character>() 或者,如果上下文已经提供了类型信息,例如函数参数或已输入的变量或常量,则可以创建空的集合,其 ...
- JVM内存区域(运行时数据区)划分
前言: 我们每天都在编写Java代码,编译,执行.很多人已经知道Java源代码文件(.java后缀)会被Java编译器编译为字节码文件(.class后缀),然后由JVM中的类加载器加载各个类的字节码文 ...
- mybatis几种开发方式
mybatis是比较轻巧的半自动化的CRM框架,它有几种开发方式,现今张列于此: 一.注解方式:在接口方法上面写SQL语句,有点类似springdataJPA 的query sql 语句 范例 @se ...
- [转] SQL SERVER 2008 R2 安装中的账户设置问题
故纸堆 原文:SQL SERVER 2008安装中设置账户的问题,2013-7 在安装SQL Server 2008数据库服务器的时候,服务器有可能处于以下几种环境中: ①工作组环境下的服务器 (Wo ...
- mysql查看存储过程show procedure status;
1.mysql查看存储过程(函数) 2.MySQL查看触发器 查看触发器 语法:SHOW TRIGGERS [FROM db_name] [LIKE expr] 实例:SHOW TRIGGERS\G ...
- idea、jdk、eclispe中空main方法的线程数量不一样,why?
測试代码: public class Test { public static void main(String[] args) { System.out.println(Th ...
- GAN Generative Adversarial Network 生成式对抗网络-相关内容
参考: https://baijiahao.baidu.com/s?id=1568663805038898&wfr=spider&for=pc Generative Adversari ...
- 是男人就下100层【第四层】——Crazy贪吃蛇(2)
在上一篇<是男人就下100层[第四层]--Crazy贪吃蛇(1)>中我们让贪吃蛇移动了起来,接下来我们来实现让贪吃蛇能够绕着手机屏幕边线移动而且能够改变方向 一.加入状态并改动代码 首先我 ...
- SQL - 创建一个学生表,要求有主键约束和非空约束
CREATE TABLE [dbo].[Student] ( [ID] [int] NOT NULL, [Name] [nchar](10) NOT NULL, [Age] [int] NOT NUL ...
- Web安全漏洞及攻击
背景介绍 先说一个在互联网上常见,但是普通人又不太理解的东西--“验证码”. 验证码(CAPTCHA)是“Completely Automated Public Turing test to tell ...