3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【mysql】実行中のクエリ一覧

Posted at

画面が固まったときにtopコマンドで見るとmysqlが100%に張り付いていて、どのSQLが原因だってときにやったことをメモ。

SQLにログインして現在実行しているSQL一覧を取得。

show processlist;

'SQL全文を表示するためには末尾に\Gをつける。
show processlist \G;

SQLを強制終了したい場合は、processlistのID項目でkillする。

kill ID項目

※Linux上でkillじゃないんで注意。

参考:MySQLで実行中のクエリ一覧を見て、SQLを強制終了する方法

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?