1. SELECT
    2. CONCAT( "KILL ", trx_mysql_thread_id, ";" ) AS kill_id
    3. FROM
    4. information_schema.INNODB_TRX
    5. WHERE
    6. trx_lock_structs = 0
    7. AND trx_weight = 0
    8. AND trx_rows_locked = 0
    9. AND trx_rows_modified = 0
    10. AND trx_state = 'RUNNING';
    1. SHOW PROCESSLIST;
    1. KILL pid;