The difference between mysql status and variables: First, you can use the following two commands to view the corresponding mysql system parameter show status like '% abc %'; show variables like '% abc % '; however, many people do not understand the difference between the two. status indicates that the state of the system cannot be changed and is the current running state parameter of the system. The descriptions are as follows: java code: mysql> show status like 'innodb _ rows _ % '; + ---------------------- + --------- + | Variable_name | Value | + ---------------------- + --------- + | Innodb_rows_deleted | 0 | bytes | 1169098 | Innodb_rows_read | 7955216 | Innodb_rows_updated | 0 | + -------------------- + --------- + 4 rows in set (0.00 sec) Description: | Innodb_rows_deleted | 0 | number of rows deleted from the innodb table, 0 indicates that the data has not been deleted. | Innodb_rows_inserted | 1169098 | the number of rows inserted in the innodb table, it indicates that 1169098 rows are inserted. | Innodb_rows_read | 7955216 | number of rows obtained by executing select for the innodb table | Innodb_rows_updated | 0 | number of rows involved in performing update for the innodb table. The preceding four rows are innodb tables. running status parameters, it cannot be manually modified, but only the system can update it. The purpose is obviously to tell the dba the current system status, so that the dba can perform optimization. The above four records are reported. Assume that dba reads more than write at this time (I am executing insert into a select * from a, so the above data is generated), you can consider creating an appropriate index. If the read is 0, the write is very large, you can consider deleting indexes and so on. Java code mysql> show variables like 'query % '; + bytes + ---------- + | Variable_name | Value | + bytes + ---------- + | query_alloc_block_size | 8192 | query_cache_limit | 1048576 | bytes | 4096 | query_cache_size | 16777216 | query_cache_type | ON | | query_cache_wlock_invalidate | OFF | query_prealloc_size | 8192 | + ------------ ------------------ + ---------- + 7 rows in set (0.00 sec) The above mark is used to view the query cache information. At this time, you can optimize the cache configuration according to the status, it can be modified by setting or modifying the configuration file.