日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

MySQL笔记-删除session,删除阻塞任务

發布時間:2025/3/15 数据库 14 豆豆
生活随笔 收集整理的這篇文章主要介紹了 MySQL笔记-删除session,删除阻塞任务 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

對應的關鍵字:

Waiting for table metadata lock

主要的命令如下:

show processlist;kill 10086;select * from information_schema.innodb_trx\G;

查processlist和kill

mysql> show processlist; +----+-----------+-----------------------+-----------+---------+------+---------------------------------+------------------------------------------------------------------------------------------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+-----------+-----------------------+-----------+---------+------+---------------------------------+------------------------------------------------------------------------------------------------------+ | 85 | financial | DESKTOP-82CT4I6:59226 | financial | Sleep | 209 | | NULL | | 86 | root | localhost:59239 | financial | Query | 44 | Waiting for table metadata lock | Alter table `financial`.`fund_open_price_year_2021`change `fundId` `fund_id` varchar(32) CHAR | | 87 | root | localhost:59240 | NULL | Sleep | 55 | | NULL | | 89 | root | localhost:59249 | NULL | Query | 0 | starting | show processlist | +----+-----------+-----------------------+-----------+---------+------+---------------------------------+------------------------------------------------------------------------------------------------------+ 4 rows in set (0.00 sec)mysql> kill 86; Query OK, 0 rows affected (0.00 sec)

查未提交的事務查詢

mysql> select * from information_schema.innodb_trx\G; *************************** 1. row ***************************trx_id: 283818627624448trx_state: RUNNINGtrx_started: 2022-02-15 15:26:30trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 0trx_mysql_thread_id: 85trx_query: NULLtrx_operation_state: NULLtrx_tables_in_use: 0trx_tables_locked: 0trx_lock_structs: 0trx_lock_memory_bytes: 1136trx_rows_locked: 0trx_rows_modified: 0trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1 trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 0 trx_autocommit_non_locking: 0 1 row in set (0.00 sec)ERROR: No query specifiedmysql> kill 85; Query OK, 0 rows affected (0.00 sec)

總結

以上是生活随笔為你收集整理的MySQL笔记-删除session,删除阻塞任务的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。