- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
MySQL status in terms of active or total connections?
The active or total connection can be known with the help of threads_connected variable. The variable tells about the number of currently open connections.
The query is as follows −
mysql> show status where `variable_name` = 'Threads_connected';
Here is the output.
+-------------------+-------+ | Variable_name | Value | +-------------------+-------+ | Threads_connected | 1 | +-------------------+-------+ 1 row in set (0.06 sec)
We can check the same with the help of show command. The query is as follows −
mysql> show processlist;
Here is the output.
+----+-----------------+-----------------+----------+---------+--------+------------------------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+-----------------+-----------------+----------+---------+--------+------------------------+------------------+ | 4 | event_scheduler | localhost | NULL | Daemon | 349012 | Waiting on empty queue | NULL | | 11 | root | localhost:54746 | business | Query | 1 | starting | show processlist | +----+-----------------+-----------------+----------+---------+--------+------------------------+------------------+ 2 rows in set (0.31 sec)
- Related Articles
- Select records with ACTIVE status in MySQL set with ENUM
- How to monitor Network connections status in Android?
- How to check which notifications are active in status bar in iOS?
- Restricting MySQL Connections to Secure Transport
- How can I check the status of MySQL Server?
- How to check table status of the tables in a particular MySQL database?
- How to plot true/false or active/deactive data in Matplotlib?
- Status register of 8257
- Handoff in Mobile Connections
- Limit total number of results across tables in MySQL?
- Get total in the last row of MySQL result?
- How to delete rows above active cell or specific text in Excel
- Get total number of rows while using LIMIT in MySQL?
- Get the number of open connections in MongoDB?
- What is redox reaction in terms of loosing or gaining of electrons?

Advertisements