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

SET PASSWORD and ALTER USER with slightly different results

    Details

      Description

      Just create two users:

      MariaDB [(none)]> create user foo identified by 'bar';
       
      MariaDB [(none)]> create user foo2 identified with mysql_native_password as '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB';
       
      MariaDB [(none)]> select user, host, password, plugin, authentication_string from mysql.user where user like 'foo%';
      +------+------+-------------------------------------------+--------+-----------------------+
      | user | host | password                                  | plugin | authentication_string |
      +------+------+-------------------------------------------+--------+-----------------------+
      | foo  | %    | *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB |        |                       |
      | foo2 | %    | *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB |        |                       |
      +------+------+-------------------------------------------+--------+-----------------------+
      

      Edit password with ALTER USER:

      MariaDB [(none)]> alter user foo IDENTIFIED with mysql_native_password as '*6AF1DDD48878E32D13C07A707FAA1E7A4CD516DA';
      

      Edit password with SET PASSWORD:

      MariaDB [(none)]> SET PASSWORD FOR 'foo2'@'%' = '*6AF1DDD48878E32D13C07A707FAA1E7A4CD516DA';
      

      Result:

      MariaDB [(none)]> select user, host, password, plugin, authentication_string from mysql.user where user like 'foo%';
      +------+------+-------------------------------------------+-----------------------+-------------------------------------------+
      | user | host | password                                  | plugin                | authentication_string                     |
      +------+------+-------------------------------------------+-----------------------+-------------------------------------------+
      | foo  | %    | *6AF1DDD48878E32D13C07A707FAA1E7A4CD516DA |                       |                                           |
      | foo2 | %    |                                           | mysql_native_password | *6AF1DDD48878E32D13C07A707FAA1E7A4CD516DA |
      +------+------+-------------------------------------------+-----------------------+-------------------------------------------+
      

      Is this intended behavior?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                dakr Daniel Krämer
              • Votes:
                2 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: