Common commands used for monitoring during MySQL database maintenance _ MySQL

Source: Internet
Author: User
Common commands used for monitoring during MySQL database maintenance: bitsCN.com

Status = show status like '%' [example: show status like 'com _ Select']
Variables = show variables like '%' [example: show variables like 'query _ cache_size ']

1. MySQL Query count (status)
Com_select; Com_update; Com_insert; Com_delete; Com_change_db

2. query cache space size: query_cache_size (variables)
Maximum query data set size in the cache: query_cache_limit (variables );
Number of queries in the cache: Qcache_inserts (status );
Query cache hit rate: (Qcache_hits/(Qcache_hits + Qcache_inserts) * 100% (status)

3. index cache hit rate
Index cache space size: key_buffer_size (variables)
Index cache hit rate: (Key_reads/Key_read_requests) * 100% (status)

4. concurrent connections
Maximum number of connections: max_connections (variables)
Actual maximum number of connections: max_used_connections (status)
Current connections: Threads_connected (status)
Active Connections: Threads_running (status)
Cache connections: Threads_cache (status)

5. traffic statistics (status)
Bytes_received, Bytes_sent (status)

6. number of connections
Connections per second: Connections (status)
Actual number of connections created 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)

BitsCN.com

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.