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

Confusing message when trying GRANT without having GRANT OPTION

    XMLWordPrintable

Details

    Description

      With a user that was created with ALL privileges, but without WITH GRANT OPTION it is possible to create users, but not to GRANT them any privileges. So far, so good, but the error message coming back from GRANT is a bit confusing:

      MariaDB [(none)]> create user testme2@localhost;
      Query OK, 0 rows affected (0.002 sec)
       
      MariaDB [(none)]> grant all on *.* to testme2@localhost REQUIRE ssl;
      ERROR 1045 (28000): Access denied for user 'testme1'@'localhost' (using password: NO)
      

      Getting back something like User 'testme1'@'localhost' is lacking GRANT OPTION would be way more clear than Access denied for user 'testme1'@'localhost' (using password: NO)

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            hholzgra Hartmut Holzgraefe
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.