Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
11.4.10
-
None
-
None
Description
In trying to automate a process to remove redundant grants (e.g. for objects that no longer exist) I have come across several issues where grants exist in the table_privileges table where the specified grantee doesn't exist as a user in the user table.
MariaDB [information_schema]> select grantee, table_schema, table_name, privilege_type from table_privileges where grantee like '%kamailio%<part of hostname>%';
|
+-------------------------+-------------------+-----------------------------+----------------+
|
| grantee | table_schema | table_name | privilege_type |
|
+-------------------------+-------------------+-----------------------------+----------------+
|
| 'kamailio'@'<hostname>' | schemaA | xxxxxxxxxxxxxxxxxxxx | SELECT |
|
| 'kamailio'@'<hostname>' | schemaB | yyyyyyyyyyyyyyyyyy | INSERT |
|
| 'kamailio'@'<hostname>' | schemaA | zzzzzzzzzzzzzzzzzzzzzzzzzzz | SELECT |
|
+-------------------------+-------------------+-----------------------------+----------------+
|
9 rows in set (0.005 sec)
|
 |
MariaDB [information_schema]> select user,host from mysql.user where host like '%<middle of hostname>%';
|
Empty set (0.001 sec)
|
.