Common commands used to monitor MySQL database maintenance (reproduced)

Source: Internet
Author: User

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

1. Number of MySQL queries (taken from show status return information)
Com_select; Com_update; Com_insert; Com_delete; com_change_db

2, query cache space size: query_cache_size
Query cache maximum query data set size: Query_cache_limit (variables); (taken from show variables return information)
Number of queries in cache: Qcache_inserts (status); (taken from show status return information)
Query Cache Hit Ratio: (qcache_hits/(Qcache_hits+qcache_inserts)) *100% (status)(from Show status return information)

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

4. Number of concurrent connections
Maximum number of connections: max_connections (variables)(taken from show variables return information)
Actual maximum number of connections: max_used_connections (status)(from Show status return information)
Current number of connections: threads_connected (status)(from Show status return information)
Number of active connections: threads_running (status)(from Show status return information)
Number of Cache connections: Threads_cache (status)(from Show status return information)

5. Traffic statistics (taken from show status return information)
Bytes_received (bytes accepted), bytes_sent (number of bytes sent)

6. Number of connections (taken from show status return information)
Number of connections per second: Connections (status)
Number of actual connections created per second: threads_created (status)

7. Table lock Statistics (taken from show status return information)
Number of table locks released immediately: table_locks_immediate (status)
Number of table locks to wait: table_locks_waited (status)

Common commands used to monitor MySQL database maintenance (reproduced)

Related Article

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.