I'm new to databases and was doing installation for a software where we have to change following in maria db.
> mariadb-server-10.6
> sudo mariadb -u root
ALTER USER 'root'@'localhost' IDENTIFIED BY 'mypassword';
UPDATE mysql.user SET authentication_string = '' WHERE user = 'root';
UPDATE mysql.user SET plugin = '' WHERE user = 'root';
I'm able to login into mariadb and ALTER password but when I perform Update I'm getting error.
ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
So was going through the documentation which state that we have to use ALTER user as now user is table instead of view
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.001 sec)
MariaDB [(none)]> use mysql;
MariaDB [mysql]> ALTER USER root SET authentication_string=''
Tried this and similar some combination but no luck