You can use mysqladmin like so:
Code:
mysqladmin -u root -h localhost -p processlist
This will give you a list of processes, where you can see how long they've been running and what the status is. Here's an example output:
Code:
+------+------+-----------+----+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+------+-----------+----+---------+------+-------+------------------+
| 3917 | root | localhost | | Query | 0 | | show processlist |
+------+------+-----------+----+---------+------+-------+------------------+
Then you can kill the process that's causing total disaster:
Code:
mysqladmin -u root -h localhost -p kill 3917
Bookmarks