Come posso monitorare il MySQL da console?

Ritratto di admin

Basta usare l'utility mtop:

# apt-get install mtop

# mtop --dbuser=root --password='mypassword'

load average: 0.49, 0.48, 0.50 mysqld 4.0.24_Debian-10-log up 0 day(s), 2:50 hrs9 threads: 1 running, 0 cached. Queries/slow: 99.5K/1 Cache Hit: 96.07% Opened tables: 3.7K RRN: 20.7M TLW: 17 SFJ: 195 SMP: 0 QPS: 0ID USER HOST DB TIME COMMAND STATE INFO3995 root localhost Query show full processlist