Common commands used for monitoring in MYSQL database maintenance _mysql

Source: Internet
Author: User

Status = Show status like '% percent ' [example: Show status like ' Com_select ']
variables = Show variables like '% percent ' [Example: show variables like ' query_cache_size ']

1, MySQL query times (status)
Com_select; Com_update; Com_insert; Com_delete; com_change_db

2, query cache space size: query_cache_size (variables)
Query cache Maximum query DataSet size: Query_cache_limit (variables);
Number of queries in the cache: Qcache_inserts (status);
Query Cache Hit Ratio: (qcache_hits/(Qcache_hits+qcache_inserts)) *100% (status)

3. Index Cache Hit Ratio
Index cache space Size: key_buffer_size (variables)
Index cache Hit Ratio: (key_reads/key_read_requests) *100% (status)

4, concurrent connection number
Maximum allowable connection number: Max_connections (variables)
Actual maximum number of connections: max_used_connections (status)
Current number of connections: threads_connected (status)
Active connection Number: threads_running (status)
Number of cached connections: Threads_cache (status)

5, Traffic statistics (status)
Bytes_received, bytes_sent (status)

6, the number of connections
Number of connections per second: connections (status)
Actual number of connections per second: threads_created (status)

7, table lock statistics
Number of table locks released immediately: table_locks_immediate (status)
Number of table locks to wait: table_locks_waited (status)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.