柳暗花明笔记

    mysql 查看正在运行的阻塞进程并把它kill掉

    所属分类:[ linux&mysql ] 猫哲学家 发表于:2017-02-23 11:43 浏览:170

    使用show processlist查看进程再用kill 进程ID;  (注意分号不能少)

    mysql> show processlist;
    +----+------+-----------+---------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
    | Id | User | Host | db | Command | Time | State | Info |
    +----+------+-----------+---------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
    | 3 | root | localhost | NULL | Query | 0 | NULL | show processlist |
    | 9 | root | localhost | 3f_vfape | Query | 10 | Copying to tmp table | select distinct
    ps_product.id_product,
    case
    when (ps_stock_available.quantity <= 0) then "Sold |
    | 10 | root | localhost | 3f_vfape | Sleep | 11 | | NULL |
    +----+------+-----------+---------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
    3 rows in set (0.00 sec)

    kill 9;

    标签: mysql 
    上一编文章 ubuntu composer 安装 下一编文章 php 删除目录下3小时前的文件
    最近文章
    发表评论