user121196
user121196

Reputation: 31030

show mysql myisam locks

when dropping or renaming a table with myisam storage engine, I realize that it's waiting for table metadata lock, however, show full processlist doesn't reveal the offending query. any idea?

| 462 | root | xxx.xxx.xxx.xx:54658 | mydb | Sleep   | 1162 |                                 | NULL                                                 |
| 465 | root | localhost           | mydb | Query   |    0 | NULL                            | show full processlist                                |
| 466 | root | localhost           | mydb | Query   |  125 | Waiting for table metadata lock | alter table mytable rename to mytable_junk |

Upvotes: 3

Views: 1235

Answers (1)

The Scrum Meister
The Scrum Meister

Reputation: 30111

Show processlist will only show connections for the current user. Login as root, or add "Process" permissions to your user.

Upvotes: 1

Related Questions