MySQL 8.0.29でコネクション数を確認する方法

環境
Ubuntu 22.04 LTS
MySQL 8.0.29-0ubuntu0.22.04.2

コネクション数の確認方法
1.起動後の接続数を確認します

mysql> SHOW STATUS LIKE 'Connections';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Connections   | 8     |
+---------------+-------+
1 row in set (0.76 sec)

2.起動後の最大同時接続数を確認します

mysql> SHOW STATUS LIKE 'Max_used_connections';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| Max_used_connections | 1     |
+----------------------+-------+
1 row in set (0.00 sec)

3.現在の接続数を確認します

mysql> SHOW STATUS LIKE 'Threads_connected';
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| Threads_connected | 1     |
+-------------------+-------+
1 row in set (0.00 sec)

 

MySQL

Posted by arkgame