

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 Questions & Answers
- 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?
- Status register of 8257
- Get total in the last row of MySQL result?
- Limit total number of results across tables in MySQL?
- Role of CSS :active Selector
- How to plot true/false or active/deactive data in Matplotlib?
- Get total number of rows while using LIMIT in MySQL?
- Handoff in Mobile Connections
- Count total divisors of A or B in a given range in C++
- Usage of :active pseudo-class in CSS
- Sum of even Fibonacci terms in JavaScript
Advertisements