First, we need to display the status of MySQL and the dynamic value of the server caused by a series of operations. We can only look at it to judge and cannot change it.
Show status; Session level.
The number of operations after this logon.
Show status like 'com _ insert'; show status like 'com _ select'; show status like 'com _ Update'; show status like 'com _ delete ';
It shows the number of times that the server is added, deleted, modified, and queried after the server is up.
Show global status;
Show global status like 'com _ insert'; show global status like 'com _ select'; show global status like 'com _ Update'; show global status like 'com _ delete ';
We recommend that you use the InnoDB engine instead of the MyISAM engine.
Show status like 'innodb _ rows %'
The number of connections is displayed. Whether you have successfully logged on or not, the last connection is counted:
Show status like 'ons ons %'
We need to enable the binary log and slow query:
Check whether slow query is Enabled:
Show status like '% slow_query_log %'