Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39386

Entries in I_S.tables_privileges that don't exist in mysql.user

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 11.4.10
    • None
    • Server
    • 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)
      

      .

      Attachments

        Activity

          People

            Unassigned Unassigned
            psumner Phil Sumner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.