Syntax\n------\n\nKILL [HARD | SOFT] { {CONNECTION|QUERY} thread_id | QUERY ID query_id | USER user_name }\n\nDescription\n-----------\n\nEach connection to mariadbd runs in a separate thread. You can see which threads are running with the SHOW PROCESSLIST statement and kill a thread with the KILL thread_id statement.KILL allows the optional CONNECTION orQUERY modifier:\n\n KILL CONNECTION is the same as KILL with no modifier: It terminates the connection associated with the given thread or query id.\n KILL QUERY terminates the statement that the connection thread_id is currently executing, but leaves the connection itself intact.\n KILL QUERY ID terminates the query by query_id, leaving the connection intact.\n\nIf a connection is terminated that has an active transaction, the transaction  is rolled back. If only a query is killed, the current transaction stays active. See also idle_transaction_timeout.\n\nIf you have the PROCESS privilege, you can see all threads.\n\nIf you have the CONNECTION ADMIN privilege, you can kill all threads and statements. Otherwise, you can see and kill only your own threads and statements.\n\nIf you have the SUPER privilege, the CONNECTION ADMIN privilege, you can kill all threads and statements. Otherwise, you can see and kill only your own threads and statements.\n\nKilling queries that repair or create indexes on MyISAM and Aria tables may result in corrupted tables. Use the SOFT option to avoid this.\n\nThe HARD option (default) kills a statement as soon as possible. If you useSOFT,  critical operations that may leave a table in an inconsistent state are not interrupted. Such operations include REPAIR and INDEX creation for MyISAM and Aria tables (REPAIR TABLE, OPTIMIZE TABLE).\n\nKILL ... USER username kills all connections and queries for a given user. USER can be specified in one of the following ways:\n\n username (kill without regard to hostname)\n username@hostname\n CURRENT_USER or CURRENT_USER()\n\nIf you specify a thread id and that thread does not exist, you get the following error:\n\n``\nERROR 1094 (HY000): Unknown thread id: <thread_id>\n`\n\nIf you specify a query id that doesn't exist, you get the following error:\n\n`\nERROR 1957 (HY000): Unknown query id: <query_id>\n`\n\nHowever, if you specify a user name, no error is issued for non-connected (or even non-existing) users. To check if the connection/query has been killed, you can use the ROW_COUNT() function.\n\nA client whose connection is killed receives the following error:\n\n`\nERROR 1317 (70100): Query execution was interrupted\n`\n\nTo obtain a list of existing sessions, use the SHOW PROCESSLIST statement or query the Information Schema PROCESSLIST table.\n\nYou cannot use KILL with the Embedded MariaDB Server library because the embedded server merely runs inside the threads of the host application. It does not create any connection threads of its own.\n\nNote: You can also use mariadb-admin kill thread_id [,thread_id...] to kill connections. To get a list of running queries,use mariadb-admin processlist`. See mariadb-admin.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/kill