mysql_kill
mysql_kill requests the MariaDB server to terminate the thread with the given process ID; use mysql_thread_id to obtain the ID of the current connection.
Last updated
Was this helpful?
mysql_kill requests the MariaDB server to terminate the thread with the given process ID; use mysql_thread_id to obtain the ID of the current connection.
int mysql_kill(MYSQL * mysql,
unsigned long);mysql - a mysql handle, which was previously allocated by mysql_init() or mysql_real_connect().
long - process id
This function is used to ask the server to kill a MariaDB thread specified by the processid parameter. This value must be retrieved by SHOW PROCESSLIST. If trying to kill the own connection mysql_thread_id() should be used.
Returns 0 on success, otherwise nonzero.
To stop a running command without killing the connection, use KILL QUERY. The mysql_kill() function only kills a connection; it doesn't free any memory - this must be done explicitly by calling mysql_close().
Last updated
Was this helpful?
Was this helpful?

