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

ALTER USER prints bad error message if specified authentication plugin is not loaded

    XMLWordPrintable

Details

    Description

      CREATE USER and GRANT print a very nice error message if a specified authentication plugin does not exist. In contrast, ALTER USER prints a generic error message, so the root cause can be difficult to determine in some cases.

      CREATE USER:

      MariaDB [(none)]> CREATE USER IF NOT EXISTS 'testuser'@'127.0.0.1' IDENTIFIED VIA ed25518 USING PASSWORD('Pa$swd123');
      ERROR 1524 (HY000): Plugin 'ed25518' is not loaded
      

      GRANT:

      MariaDB [(none)]> CREATE USER IF NOT EXISTS 'testuser'@'127.0.0.1' IDENTIFIED BY 'Pa$swd123';
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED VIA ed25518 USING PASSWORD('Pa$swd123');
      ERROR 1524 (HY000): Plugin 'ed25518' is not loaded
      

      ALTER USER:

      MariaDB [(none)]> CREATE USER IF NOT EXISTS 'testuser'@'127.0.0.1' IDENTIFIED BY 'Pa$swd123';
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> ALTER USER 'testuser'@'127.0.0.1' IDENTIFIED VIA ed25518 USING PASSWORD('Pa$swd123');
      ERROR 1396 (HY000): Operation ALTER USER failed for 'testuser'@'127.0.0.1'
      

      I think that ALTER USER's error message should be similar to the one used by CREATE USER and GRANT in this case.

      Attachments

        Issue Links

          Activity

            People

              cvicentiu Vicențiu Ciorbaru
              GeoffMontee Geoff Montee (Inactive)
              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.