Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to monitor MySQL in Linux system

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to monitor MySQL in Linux system". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how the Linux system monitors MySQL".

Methods:

\ 1. Install TermReadKey

Download address: http://search.cpan.org/CPAN/authors/id/J/JS/JSTOWE/TermReadKey-2.30.tar.gz

Installation:

Tar xzvf TermReadKeycd TermReadKeyperl Makefile.plmakemake testmake install

\ 2. Install DBI

Download address: http://cpan.uwinnipeg.ca/dist/DBI

Installation:

Tar xzvf DBI-1.615.tar.gzcd DBI-1.615perl Makefile.plmakemake testmake install

\ 3. Install Mytop

Download address: http://jeremy.zawodny.com/mysql/mytop/mytop-1.6.tar.gz

Installation:

Tar xzvf mytop-1.6.tar.gzcd mytop-1.6perl Makefile.plmakemake testmake install

\ 4. Run Mytop for monitoring

. / mytop-u wapcms-p '4lRPjpIda7AccAQUR'-h 192.168.52.148purl 3308

[where the-u parameter is followed by the database user name, the-p parameter is followed by the database password, and the-h parameter is followed by the database server address and the port number used by the database]

The running monitoring screen is as follows:

Description:

The first line shows the host name, as well as the running time of MySQL so far (in days hour:minutes:seconds format).

The second and third lines of Queries show the total number of SQL query statements executed so far, as well as the number and speed of queries currently processed per second.

The Key Efficiency in the fourth line is the legendary cache hit rate. If it is too low, you may want to adjust your MySQL settings, or adjust the structure of the table, followed by the current entry and exit speed.

The bottom area is each thread currently linked to the database. You can press k to kill a thread, or press f to get information about a specific thread.

At this point, I believe you have a deeper understanding of "how the Linux system monitors MySQL". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report