SELECTCONCAT( "KILL ", trx_mysql_thread_id, ";" ) AS kill_id FROMinformation_schema.INNODB_TRX WHEREtrx_lock_structs = 0 AND trx_weight = 0 AND trx_rows_locked = 0 AND trx_rows_modified = 0 AND trx_state = 'RUNNING'; SHOW PROCESSLIST; KILL pid;