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:

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:

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的更多相关文章

  1. 解决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 ...

  2. MySQL错误日志显示(Got an error reading communication packets)的问题

    错误显示: 2019-05-28T12:54:08.267934+08:00 820396 [Note] Aborted connection 820396 to db: 'Databaseplatf ...

  3. mysql5.7日志时间戳(log_timestmaps)与系统时间不一致问题以及日志报Got an error reading communication packets情况分析

    一.mysql安装后error_log日志时间戳默认为UTC(如下图),因此会造成与系统时间不一致,与北京时间相差8个小时. 解决errro_logs时间戳与linux系统时间不一致问题 step1: ...

  4. Got timeout reading communication packets解决方法

    Got timeout reading communication packets解决方法 http://www.th7.cn/db/mysql/201702/225243.shtml [Note] ...

  5. 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 ...

  6. 翻译:MySQL "Got an Error Reading Communication Packet" Errors

    前言: 本文是对Muhammad Irfan的这篇博客MySQL "Got an Error Reading Communication Packet" Errors的翻译,如有翻 ...

  7. 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 ...

  8. 使用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 ...

  9. 问题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 ...

随机推荐

  1. python学习之-- redis模块操作 集合和有序集合

    redis 模块操作之 集合set和有序集合zset Set 集合操作,不允许重复的列表sadd(name,value):name对应的集合中添加元素scard(name):获取name对应的集合中元 ...

  2. Codeforces Round #533 (Div. 2) E 最大独立集

    知识点 最大独立集(set) = 补图的最大团(clique ) 最小顶点覆盖 + 最大独立集 = V E. Helping Hiasat time limit per test 2 seconds ...

  3. Codeforces 549C The Game Of Parity【博弈】

    C语言纠错大赛的一道题,正好拿来补博弈~~ 给的代码写的略奇葩..不过还是直接在上面改了.. 题目链接: http://codeforces.com/problemset/problem/549/C ...

  4. 学习日常笔记<day12>jsp基础

    1.Jsp基础 1.1Jsp引入 Servlet的作用:用java语言开发动态资源的技术 Jsp的作用:用java语言(+html语言)开发动态资源的技术 jsp就是servlet 1.2Jsp的特点 ...

  5. 洛谷 P2862 [USACO06JAN]把牛Corral the Cows

    P2862 [USACO06JAN]把牛Corral the Cows 题目描述 Farmer John wishes to build a corral for his cows. Being fi ...

  6. Spring中使用byType实现Beans自动装配

    以下内容引用自http://wiki.jikexueyuan.com/project/spring/beans-auto-wiring/spring-autowiring-byType.html: 此 ...

  7. [NPM] npm check to update the dependencies

    To update the dependencies in the project, we can run: npx npm-check -u

  8. react 组件之间传值

    谈及React时,就会想到一个很重要的思想,就是组件化思想.它将可以重用的部分进行组件化开发,形成一个个相对独立的组件,那么组件化后,你也会提出些疑问,组件与组件之间,将怎样进行信息的传递呢?下面来介 ...

  9. Android开发:怎样隐藏自己的app应用

    本文主要介绍怎样通过改动AndroidManifest.xml清单文件来达到隐藏自身应用的目的,不是隐藏第三方应用.为了不浪费大家时间.特此说明. 转载请注明作者xiong_it和链接:http:// ...

  10. Rust 1.7.0 语法基础 sep_token 和 non_special_token

    一.分隔符 sep_token 指的是分隔符, 是除了 * 和 + 之外的不论什么符号,通常情况下是使用 , 逗号. 比如: 宏的多个參数分隔,以下代码中的逗号就是 sep_token (target ...