Terminal applications to check MySQL performance

A while ago i showed you some commands by which they could manage a MySQL server, create users, work with databases, etc. Well, in this article I will show you some applications that you can use in the terminal to see how the queries are on the MySQL server, that is, check the performance of MySQL, see the queries in progress, etc.

My Top

Do you remember top O well htop that serves as a monitor of the system in terminal? Good, mytop it has been the same but for MySQL

You must first install it, for this search in your repository and install the package called mytop:

In Debian, Ubuntu or derivatives it would be

sudo apt-get install mytop

Once installed they execute it but of course, they must specify the username, password and IP of the MySQL server, for example, assuming they run mytop on the same server using SSH or something similar, assuming that the user is root and the password is t00r ... then it would be:

mytop -u root -p t00r

mytop

As you can see in the image mytop gives us various information:

  • Statistics of threads in use
  • SQL Queries
  • How long the service has been running
  • Load or consumption
  • Request IP
  • User making the request
  • Time ... etc

MyTop is a program written in Perl, it is an excellent option to check how our MySQL server is doing.

Innotop

This is installed by default when we install the MySQL server, so we just have to execute it, passing it as with mytop the username and password:

innotop -u usuario -p password -h ip-del-servidor

Assuming that the user is root, the password is t00r and that we execute the command by SSH on the same server:

innotop -u root -p t00r

innotop_1

As you can see, it gives us interesting information, incoming and outgoing data, load, scope or use of the cache, etc.

mysqladmin

Of this I already talked to you in another postHowever, remember that with the following command we can see information about the MySQL server:

mysqladmin -u usuario -p password version

Assuming again, that the user is root and the password is t00r, it would be:

mysqladmin -u root -p version

And it will ask us for the password ... then we find something like this:

mysqladmin

Here we see the version of MySQL, number of threads working, type of connection, service life time, etc.

End

If you are looking for a good tool to monitor the performance and operation of your MySQL server, I recommend mytop e innotop.

One shows information that the other does not, both are actually excellent options, depending on what we need to review, these will be more than enough.

Well this is where the post goes.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

2 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Jorge cano said

    good job, this did not know.

  2.   edo said

    And for postgress?