Other way to disconnect user/client in mySql 5.6? Hello everyone is there another way of disconnecting user/client aside from:

kill id


I have a close button which when i click the button it will close the connection on the selected user... but the problem in my side is that connection ID is changed every process... i can't determine which connection ID should be killed.

this syntax also didn't work using laravel db query..

DB::select( " SELECT CONCAT('KILL ',  $userCon, ';') FROM information_schema.processlist WHERE user = $id;");


Hope anyone could help me... Thanks in advance.

Note: I used Laravel in my Web.
Enforcing limits: ALTER USER and set MAX_USER_CONNECTIONS.

If you where using MariaDB you'd have KILL USER

Otherwise, for MySQL and non-MariaDB, for killing off connections try the following SQL:

select @kill := GROUP_CONCAT(CONCAT('KILL ',  id, ';')) FROM information_schema.processlist WHERE user = $id;;
PREPARE stmt FROM @kill;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;