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.

RolandoMySQLDBA
  • 185,223
  • 33
  • 326
  • 536

1 Answers1

0

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.

RolandoMySQLDBA
  • 185,223
  • 33
  • 326
  • 536