Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4.7
-
None
Description
GRANT prints a very nice error message if the specified user account does not exist and sql_mode has NO_AUTO_CREATE_USER set. In contrast, ALTER USER prints a generic error message, so the root cause can be difficult to determine in some cases.
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 SELECT ON *.* TO 'testuserr'@'127.0.0.1';
|
ERROR 1133 (28000): Can't find any matching row in the user table
|
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 'testuserr'@'127.0.0.1' IDENTIFIED VIA ed25519 USING PASSWORD('Pa$swd123');
|
ERROR 1396 (HY000): Operation ALTER USER failed for 'testuserr'@'127.0.0.1'
|
I think that ALTER USER's error message should be similar to the one used by GRANT in this case.
Attachments
Issue Links
- includes
-
MDEV-20434 ALTER USER prints bad error message if specified authentication plugin is not loaded
- Open
- relates to
-
MDEV-20434 ALTER USER prints bad error message if specified authentication plugin is not loaded
- Open
-
MDEV-22312 Bad error message for SET DEFAULT ROLE when user account is not granted the role
- Closed