BrianB BrianB - 1 year ago 149
MySQL Question

mysql show processes

I don't have phpMyAdmin installed on a ubuntu server but want to show all mysql processed. I know that you can do a "show_processes" in phpMyAdmin but how can I do it via shell?

Answer Source
mysql -u USER -pPASS -P PORT -h HOST < "show processlist"


-u = user
-p = password
-P = port number
-h = HOST

if you want to get the details via information_schema views,

sql="select * from information_schema.processlist where ???"
mysql -u USER -pPASS -P PORT -h HOST < $sql
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download