English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Il comando “SHOW processlist” può essere utilizzato per visualizzare i thread in esecuzione relativi solo al tuo account MySQL. Se abbiamo privilegi di processo, possiamo vedere quasi tutti i thread in esecuzione. Mostra quali thread sono in esecuzione.
Di seguito è la query.
mysql> SHOW processlist;
Questo è l'output.
+----+-----------------+-----------------+------+---------+------+------------------------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+-----------------+-----------------+------+---------+------+------------------------+------------------+ | 4 | event_scheduler | localhost | NULL | Daemon | 968 | Waiting on empty queue | NULL | | 9 | root | localhost:50255 | NULL | Query | 0 | starting | show processlist | +----+-----------------+-----------------+------+---------+------+------------------------+------------------+ 2 righe nel set (0.00 sec)
Se cambiamo il database, l'output sarà diverso, ma ci saranno sempre due utenti: “event_scheduler” e “root”.
Proviamo di nuovo a fare la query.
mysql> SHOW processlist;
Ecco l'output.
+----+-----------------+-----------------+----------+---------+------+------------------------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+-----------------+-----------------+----------+---------+------+------------------------+------------------+ | 4 | event_scheduler | localhost | NULL | Daemon | 1148 | Waiting on empty queue | NULL | | 9 | root | localhost:50255 | business | Query | 0 | starting | show processlist | +----+-----------------+-----------------+----------+---------+------+------------------------+------------------+ 2 righe nel set (0.00 sec)