How to check the Mysql status

This tutorial shows how to check the status of a MySql server.

The command show processlist; shows all the process that are running on the MySql instance at the given time and that the user has access to.

Here an example of the command in the MySql Command Line client:

mysql> show processlist;
+----+------+-----------------+------+---------+------+-------+------------------+
| Id | User | Host            | db   | Command | Time | State | Info |
+----+------+-----------------+------+---------+------+-------+------------------+
|  1 | root | localhost:56636 | h1b  | Sleep   |  171 |       | NULL |
|  3 | root | localhost:56741 | test | Sleep   |    2 |       | NULL |
|  4 | root | localhost:56742 | test | Sleep   |   28 |       | NULL |
|  5 | root | localhost:56754 | NULL | Query   |    0 | init  | show processlist |
+----+------+-----------------+------+---------+------+-------+------------------+
4 rows in set (0.00 sec)

mysql>

The output will be:

Test successful = true
Tests run = 3
Test time = 8 ms

References:

MySql

Share this article:

Recent Comments