Sometimes you may wish to see more of what's happening at the MySQL level. It may be because of performance or some other issue. Below are some options that can be taken. Log on to MySQL as root.

Windows -

cd c:\xampplite\mysql\bin
mysql -u root -popenauditrootuserpassword

Linux -

mysql -u root -popenauditrootuserpassword


Both the commands below are useful to see statistics about MySQL.

SHOW global status LIKE '%onn%';
SHOW processlist;
SHOW status WHERE `variable_name` = 'Threads_connected';
SELECT * FROM information_schema.processlist;


Some Linux specific commands are below for the shell (bash).

sudo mysqladmin processlist
mysqladmin status
netstat -nat | grep 3306

 

https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html