[MySQL] MGR错误日志出现大量Got an error reading communication packets报错

MySQL错误日志出现大量的 Got an error reading communication packets 报错

2017-12-19T13:45:30.520979+08:00 209938 [Note] Aborted connection 209938 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:45:38.079170+08:00 209977 [Note] Aborted connection 209977 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:45:43.181608+08:00 209994 [Note] Aborted connection 209994 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:45:55.358198+08:00 210024 [Note] Aborted connection 210024 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:46:18.637414+08:00 210048 [Note] Aborted connection 210048 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:46:24.350035+08:00 210068 [Note] Aborted connection 210068 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:46:27.782725+08:00 210070 [Note] Aborted connection 210070 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:46:33.734913+08:00 210113 [Note] Aborted connection 210113 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:47:24.663976+08:00 210143 [Note] Aborted connection 210143 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:47:48.532414+08:00 210171 [Note] Aborted connection 210171 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:50:55.389600+08:00 210264 [Note] Aborted connection 210264 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:51:52.200686+08:00 210312 [Note] Aborted connection 210312 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:53:18.220629+08:00 210372 [Note] Aborted connection 210372 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:54:20.138416+08:00 210528 [Note] Aborted connection 210528 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:54:58.566553+08:00 210597 [Note] Aborted connection 210597 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:54:59.011252+08:00 210604 [Note] Aborted connection 210604 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:55:35.805322+08:00 210616 [Note] Aborted connection 210616 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:56:04.918893+08:00 210707 [Note] Aborted connection 210707 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:56:18.713241+08:00 210756 [Note] Aborted connection 210756 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:57:46.983769+08:00 210854 [Note] Aborted connection 210854 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:58:22.214034+08:00 210890 [Note] Aborted connection 210890 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:59:38.062524+08:00 210859 [Note] Aborted connection 210859 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T14:01:19.203145+08:00 211000 [Note] Aborted connection 211000 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T14:02:06.677057+08:00 211055 [Note] Aborted connection 211055 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T14:04:47.181184+08:00 211187 [Note] Aborted connection 211187 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)


查看log_warnings设置

mysql> select @@log_warnings;
+----------------+
| @@log_warnings |
+----------------+
|              2 |
+----------------+
1 row in set, 1 warning (0.00 sec)

mysql>

将log_warnings参数设为1

mysql> set global log_warnings=1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> select @@log_warnings;
+----------------+
| @@log_warnings |
+----------------+
|              1 |
+----------------+
1 row in set, 1 warning (0.00 sec)

mysql>

此时,上面的大量日志就不会出现在错误日志里面了。

MySQL官方对log_warnings参数的解释是:Print out warnings such as Aborted connection... to the error log. This option is enabled (1) by default. To disable it, use --log-warnings=0. Specifying the option without a level value increments the current value by 1. Enabling this option by setting it greater than 0 is recommended, for example, if you use replication (you get more information about what is happening, such as messages about network failures and reconnections). If the value is greater than 1, aborted connections are written to the error log, and access-denied errors for new connection attempts are written

http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-warnings

因为我的环境是MySQL Group Replication集群,还需要tracking网络异常等错误所以将log_wanings设置为1。

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值