kill mysqld process code example
Example 1: mysql kill
mysql> SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ')
FROM information_schema.processlist WHERE user <> 'system user';
Example 2: kill all mysql processes
sudo killall mysqld
mysql> SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ')
FROM information_schema.processlist WHERE user <> 'system user';
sudo killall mysqld