BrianB
BrianB

Reputation: 35

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? Thanks

Upvotes: 2

Views: 12281

Answers (2)

user3081809
user3081809

Reputation: 105

mysql -uuser -p -e "show full processlist"

or

mysql -uuser -p -e "show processlist"

Upvotes: 0

ajreal
ajreal

Reputation: 47331

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

details:

-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

Upvotes: 7

Related Questions