MySQL – Privilege to Kill Processes of Other Users

MySQLpermissions

I have a percona mysql database. The version is 5.5.29-29.4-log.

I have created a user called admin which should be able to kill processes initiated by other users, i.e worker.

GRANT SELECT, INSERT, UPDATE, DELETE, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON *.* TO 'admin'@'ip_' IDENTIFIED BY PASSWORD 'password';

It does had the process privilege, which I thought would do the trick. But, I can see this error

/* SQL Error (1095): You are not owner of thread 7480126 */

Would anyone be able to help?

Best Answer

From here

If you have the PROCESS privilege, you can see all threads. If you have the SUPER privilege, you can kill all threads and statements. Otherwise, you can see and kill only your own threads and statements.

You can also use the mysqladmin processlist and mysqladmin kill commands to examine and kill threads.

See here for privilege granting - search for SUPER.