存在的记忆 - 杀进程
type: channel
link: https://www.looaon.com/index.php/tag/杀进程/
items: AWS RDS for MySQL如何终止会话
items: 根据进程名字杀掉进程

AWS RDS for MySQL如何终止会话
type: item
date: 2019-06-25T22:26:00+08:00
description: mysql.rds_kill_query_id 终止针对MySQL或MariaDB服务器运行的查询。语法CALL mysql.rds_kill_query_id(queryID); 参数queryID 整数。将终止的查询的标识。使用说明要终止针对 MariaDB 服务器运行的查询，请使用 mysql.rds_kill_query_id 过程并传入该查询的 ID。要获取查询 ID，如下所示：SELECT USER, HOST, COMMAND, TIME, STATE, INFO, QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = '<user name> 以下示例终止查询 ID 为 11195102 的查询：call mysql.rds_kill_query_id(11195102); 批量kill session的语句:select concat('CALL mysql.rds_kill(',id,');') from information_schema.processlist where user='gwmmm'; select concat('CALL mysql.rds_kill(',trx_mysql_thread_id,');') from information_schema.innodb_trx; CALL mysql.rds_kill( 11195230); CALL mysql.rds_kill( 11195102); CALL mysql.rds_kill( 11195114); CALL mysql.rds_kill( 11195108); CALL mysql.rds_kill( 11195179); CALL mysql.rds_kill( 11195224); CALL mysql.rds_kill( 11195214); CALL mysql.rds_kill( 11194577); CALL mysql.rds_kill( 11195476); CALL mysql.rds_kill( 11194995); CALL mysql.rds_kill( 11195187); CALL mysql.rds_kill( 11195022); CALL mysql.rds_kill( 11195319);

根据进程名字杀掉进程
type: item
date: 2018-11-30T10:44:00+08:00
description: ps -ef | grep chromium | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9