I have a Mysql db server which seems to be getting slow by time. When i am checking detail from SHOW STATUS LIKE '%onn%'; I get following details

Variable_name                                  Value   
---------------------------------------------  --------
Aborted_connects                               2       
Connection_errors_accept                       0       
Connection_errors_internal                     0       
Connection_errors_max_connections              0       
Connection_errors_peer_address                 0       
Connection_errors_select                       0       
Connection_errors_tcpwrap                      0       
Connections                                    2327    
Max_used_connections                           7       
Performance_schema_session_connect_attrs_lost  0       
Ssl_client_connects                            0       
Ssl_connect_renegotiates                       0       
Ssl_finished_connects                          0       
Threads_connected                              5       

Is there anyway i can get the connections detail of the open connections? Like source ip, username e.t.c. Mysql version is 5.6

  • 1
    Connection details must be obtained from logs (and some data - from show processlist), not from status variables.
    – Akina
    Commented Apr 30, 2019 at 10:08
  • show processlist is not giving any deatils. which particular log should i check? Commented Apr 30, 2019 at 10:14
  • General log, of course... but 1) it must be enabled 2) it is too expensive for permanent logging. Like source ip, username e.t.c. Processlist gives this info (host->IP must be converted using proper namespace server logs or local ARP logs). What is 'etc.'?
    – Akina
    Commented Apr 30, 2019 at 10:31
  • It appears to me that connections must be a running total as I know I don't have 51000+ or even 1600+ if I subtract off the aborted ones. I can believe I've had 1600 since last reboot. Threads_connected is showing what is currently connected, which is what is listed via show processlist
    – topshot
    Commented Apr 30, 2019 at 11:54
  • topshot you mean's there seem to be no problem? Connections mean's number of connection since last db server have started? Commented Apr 30, 2019 at 12:06

1 Answer 1


Their docs indicate that connections variable is,

"The number of connection attempts (successful or not) to the MySQL server."

I just stopped and restarted the service on my dev server and connections dropped from 28 to 6.

Threads_connected is

"The number of currently open connections."

and those are shown using show processlist;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.