|
When trying to change the authentication plugin one can get an generic error which does not provide any useful information.
In this case the returned error is:
ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
|
while it should be:
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
|
Example: With freshly installed 10.5 the root is identified via unix_socket
MariaDB [(none)]> SHOW GRANTS;
|
+------------------------------------------------------------------------------------------------+
|
| Grants for root@localhost |
|
+------------------------------------------------------------------------------------------------+
|
| GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED VIA unix_socket WITH GRANT OPTION |
|
| GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION |
|
+------------------------------------------------------------------------------------------------+
|
ALTER attempt results in:
MariaDB [(none)]> ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('password');
|
ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
|
The error is not informative because the problem actually is with pasword not satisfying password check plugins so the following works:
MariaDB [(none)]> ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('1_Password_password');
|
Query OK, 0 rows affected (0.009 sec)
|
|
MariaDB [(none)]> SHOW GRANTS;
|
+----------------------------------------------------------------------------------------------------------------------------------------+
|
| Grants for root@localhost |
|
+----------------------------------------------------------------------------------------------------------------------------------------+
|
| GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*B3D4E1ED7AF203404648B1010BBE3F5C41B8FC39' WITH GRANT OPTION |
|
| GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION |
|
+----------------------------------------------------------------------------------------------------------------------------------------+
|
2 rows in set (0.000 sec)
|
|