O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

PROCESSLIST

One of the most used views is the process list. It lists all the queries running on the server:

mysql> SELECT * FROM PROCESSLIST\G*************************** 1. row ***************************     ID: 85   USER: event_scheduler   HOST: localhost     DB: NULLCOMMAND: Daemon   TIME: 44  STATE: Waiting for next activation   INFO: NULL*************************** 2. row ***************************     ID: 26231   USER: root   HOST: localhost     DB: information_schemaCOMMAND: Query   TIME: 0  STATE: executing   INFO: SELECT * FROM PROCESSLIST2 rows in set (0.00 sec

Or you can execute SHOW PROCESSLIST; to get the same output.

Other tables: ROUTINES contains the definition of functions and stored routines. TRIGGERS contains the definition of triggers. VIEWS contains ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required