
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How to customize `show processlist` in MySQL?
The show processlist can be customized with the help of information_schema.processlist. In newer MySQL version, the “show processlist” command can be used in “information_schema”.
The “information_schema.processlist” has been added in MySQL version 5.1.7. Firstly, let us check the MySQL version. The query to check the version is as follows −
mysql> select version();
The following is the output.
+-----------+ | version() | +-----------+ | 8.0.12 | +-----------+ 1 row in set (0.00 sec)
Now ,we can use the customized “show processlist”.The query is as follows.
mysql> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
The following is the output.
+----+-----------------+-----------------+----------+---------+-------+------------------------+----------------------------------------------+ | ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO | +----+-----------------+-----------------+----------+---------+-------+------------------------+----------------------------------------------+ | 8 | root | localhost:50599 | business | Query | 0 | executing | SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST | | 9 | root | localhost:53404 | NULL | Sleep | 132 | | NULL | | 4 | event_scheduler | localhost | NULL | Daemon | 71998 | Waiting on empty queue | NULL | +----+-----------------+-----------------+----------+---------+-------+------------------------+----------------------------------------------+ 3 rows in set (0.06 sec)
- Related Articles
- How do I kill all the processes in MySQL “show processlist”?
- What does 'show processlist' command do in MySQL?
- How can MySQL COALESCE() function be used with MySQL SUM() function to customize the output?
- How to customize how a JTabbedPane looks in Java?
- How to customize the X-axis in Matplotlib?
- How to customize X-axis ticks in Matplotlib?
- How to show GRANTS for root in MySQL?
- How to customize spines of Matplotlib figures?
- How to how to customize snackBar's layout in Android?
- How to customize a button to set text and color in Android?
- How to customize the viewport of the canvas using FabricJS?
- How to customize the color and colormaps of a Plot in Matplotlib
- How to customize the axis label in a Seaborn jointplot using Matplotlib?
- Difference between SHOW INDEX, SHOW INDEXES and SHOW KEYS in MySQL?
- How can I customize value, instead of NULL, of a row by using MySQL IF() function?

Advertisements