1

In MySQL 5.5 running on Ubuntu 14 in a master-master-slave configuration

From one of the masters, when executing the query below as a user with (ALL PRIVILEGES) on the database but no other privileges elsewhere, this query returns 0

SELECT COUNT(1) SlaveThreadCount 
FROM information_schema.processlist 
WHERE user='system user'

When executing the same user as root, I.E. (ALL PRIVILEGES) on everything, I get back the real slave count.

Any particular reason I'm getting back 0 and not the real SlaveThreadCount which is 2 in this case?

Is this is privileges issue?

If I run the query without there WHERE in the non-root user, I only see my processes.

SELECT * FROM information_schema.processlist

If I run it in a root user, then I see all processes.

So definitely a permissions issue, so looks like I need PROCESS, just answered my own question.

1 Answer 1

1

If you have all privileges on a specific database, you cannot have the PROCESS privilege. Why ? The PROCESS privilege is not a database-level privilege. It's a global privilege. How ?

About 2.5 years ago, I answered How to grant super privilege to the user? Someone wanted the SUPER privilege but only had all privileges on a database. I explained by mentioning how global grants and database-level grants are stored. In short, there is a column called Super_priv in the table mysql.user (where global grants are stored). That column does not exist in mysql.db (where database-level grants are stored).

The same exact thing applies to the PROCESS privilege. There is a column called Process_priv in the table mysql.user. That column does not exist in mysql.db.

1
  • Hi Rolando, yes and actually I did add the Super privilege as you explained and that worked out great. Thanks for the Process_priv column as well. Nov 28, 2016 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.