Change MariaDB Root Password

MariaDB mysql tries to authenticate root using plugin, not password. You need to disable plugin usage for root.

Login to mysql using shell

mysql -u root -p

default MariaDB mysql use unix_socket, and user use mysql_native_password plugin

mariadb-root-plugin

then change user root plugin to empty string and then change root mysql password and exit.

use mysql;
update user set plugin='' where User='root';
flush privileges;

update user SET PASSWORD=PASSWORD("newpassword") WHERE USER='root';
flush privileges;
\q

mariadb-rootpass



Links:
Reset MariaDB root password