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

role is creating succesfully but cant grant any privilege to it and after flush privileges it gives ERROR 1133 (28000)

    XMLWordPrintable

Details

    Description

      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 346
      Server version: 10.3.12-MariaDB-1:10.3.12+maria~bionic mariadb.org binary distribution
       
      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
       
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
       
      MariaDB [(none)]> create user demo1 identified by '1234';
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> create role r1;
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> grant all on *.* to r1;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [(none)]> grant r1 to demo1;
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> show grants for r1;
      +----------------------------+
      | Grants for r1              |
      +----------------------------+
      | GRANT USAGE ON *.* TO 'r1' |
      +----------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [(none)]> set default role r1 for demo1;
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> exit
      Bye
      

      ~$ mysql -u demo1 -p
      Enter password: 
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 348
      Server version: 10.3.12-MariaDB-1:10.3.12+maria~bionic mariadb.org binary distribution
       
      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
       
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
       
      MariaDB [(none)]> show databases;
      +--------------------+
      | Database           |
      +--------------------+
      | information_schema |
      +--------------------+
      1 row in set (0.001 sec)
       
      MariaDB [(none)]> select current_role();
      +----------------+
      | current_role() |
      +----------------+
      | r1             |
      +----------------+
      1 row in set (0.000 sec)
       
      MariaDB [(none)]> show grants for demo1;
      +------------------------------------------------------------------------------------------------------+
      | Grants for demo1@%                                                                                   |
      +------------------------------------------------------------------------------------------------------+
      | GRANT r1 TO 'demo1'@'%'                                                                              |
      | GRANT USAGE ON *.* TO 'demo1'@'%' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' |
      +------------------------------------------------------------------------------------------------------+
      2 rows in set (0.000 sec)
      MariaDB [(none)]> select current_user();
      +----------------+
      | current_user() |
      +----------------+
      | demo1@%        |
      +----------------+
      1 row in set (0.000 sec)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            shubhamerubytes Shubham
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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