zoukankan      html  css  js  c++  java
  • mysql 批量删除process

    mysql>show processlist; 查看数据库中所有进程

    mysql> select concat('KILL ',id,';') from information_schema.processlist where user='root'and db = 'onlineshow';
    +------------------------+
    | concat('KILL ',id,';') 
    +------------------------+
    | KILL 3101;             
    | KILL 2946;             
    +------------------------+
    2 rows in set (0.00 sec)
     
    mysql>select concat('KILL ',id,';') from information_schema.processlist where user='root' into outfile '/tmp/a.txt';
    Query OK, 2 rows affected (0.00 sec)
     !!!!注意 /tmp/a.txt 路径不对, 在根目录下查找find . -name 'a.txt'  是在/var/lib/mysql/a.txt 目录下
    mysql>source /var/lib/mysql/a.txt;
    Query OK, 0 rows affected (0.00 sec)
     
    关注公众号 海量干货等你
  • 相关阅读:
    CF733F
    P4826
    洛谷P2687 & P1108
    CF42A
    洛谷P1858
    CF1428C
    洛谷P4981
    树形DP
    背包六讲(也不知道为啥就是六个 $QwQ$)
    2020
  • 原文地址:https://www.cnblogs.com/sowhat1412/p/12734359.html
Copyright © 2011-2022 走看看