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
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
Previous page: Convert a MySQL database to UTF-8
Next page: Format Factory