Mysql – How to reset Aborted_connects in MySQL

MySQL

A recent issue in our network caused a large number of aborted connects, which is now being displayed on the health dashboard of our web application as a potential issue.

Aside from restarting MySQL, is there a way to reset Aborted_connects to 0? I have tried flush hosts and flush status, but they do not reset Aborted_connects

EDIT : MySQL 5.7.24

Best Answer

The reason FLUSH STATUS doesn't reset this is because its a function in MySQL rather than a simple variable (code ref).

Using gdb assignment, you should be able to:

gdb -p $(pidof mysqld) -batch \
  -ex 'set variable Connection_handler_manager::m_instance->m_aborted_connects = 0L' \
  -ex continue \
  -ex quit

Otherwise you don't have much choice apart from a restart.