Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql kill

mysql> SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ') 
 
FROM information_schema.processlist WHERE user <> 'system user';
Comment

mysql kill

-- 查询执行时间超过2分钟的线程,然后拼接成 kill 语句
select concat('kill ', id, ';')
from information_schema.processlist
where command != 'Sleep'
and time > 2*60
order by time desc
Comment

PREVIOUS NEXT
Code Example
Sql :: db.relationship sqlalchemy flask 
Sql :: How to pass password to mysql command line 
Sql :: mysql money value 
Sql :: constraints to columns SQL 
Sql :: update one column from another column in same table 
Sql :: sql all 
Sql :: sql email Regex 
Sql :: oracle sql concatenate results into string 
Sql :: mysql grant all on all databases 
Sql :: avg sql 
Sql :: how to access to mysql without root 
Sql :: SQL server how to see user permissions on objects 
Sql :: change user mysql password 
Sql :: how to count number of rows in sql 
Sql :: sql constraint check value in list 
Sql :: postgres update with if condition query 
Sql :: sql cast 
Sql :: Create boolean column in MySQL with false as default value? 
Sql :: create tablespace oracle multiple datafiles 
Sql :: mysql select row with min date 
Sql :: FIND AVERAGE SALARY EARNER IN SQL 
Sql :: Save PL/pgSQL output from PostgreSQL to a CSV file 
Sql :: create table query in mysql 
Sql :: ms sql database data size 
Sql :: rename column mysql 
Sql :: postgresql procedure example 
Sql :: sql not equal 
Sql :: print hello world in sql 
Sql :: oracle show parameter 
Sql :: mssql server port 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =