reading communication packets

在使用mysql5.7的时候,发现了不少在mysql5.6上不曾见过的日志,级别为note, 最常见的note日志以下三种,下面我们来逐个解释。
第一种,Aborted connection . 如上图,信息如下:
2020-08-17T14:44:24.102542Z 59 [Note] Aborted connection 59 to db: ‘unconnected’ user: ‘mha’ host: ‘10.xx.xx.xx’ (Got an error reading communication packets)
2020-08-17T14:44:31.273897Z 61 [Note] Aborted connection 61 to db: ‘unconnected’ user: ‘mha’ host: ‘10.xx.xx.xx(Got an error reading communication packets)
2020-08-17T14:44:31.273897Z 61 [Note] Aborted connection 61 to db: ‘unconnected’ user: ‘mha’ host: ‘10.xx.xx.xx(Got an error reading communication packets)
 
2020-08-17T14:44:31.273897Z 61 [Note] Aborted connection 61 to db: ‘unconnected’ user: ‘mha’ host: ‘10.xx.xx.xx(Got  timeout  reading communication packets)
 
上面两个是连接中断的错误信息,原因不一样,
Got an error reading communication packets  的原因是因为网络等原因导致
Got  timeout  reading communication packets 这个错误的原因是会话的idle时间达到了数据库指定的timeout时间。
原文地址:https://www.cnblogs.com/igoodful/p/13572948.html