PHPMyAdmin doesn’t allow login with root user. You could use a workaround and create a new user with root privileges.
The command below will create the user newroot with the password some_password. Change them to suit your needs.
mariadb --defaults-file=/root/.my.cnf -uroot -e "CREATE USER 'newroot'@'localhost' IDENTIFIED BY 'some_password';"
mariadb --defaults-file=/root/.my.cnf -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'newroot'@'localhost' WITH GRANT OPTION;FLUSH PRIVILEGES;"
Once the user is created, try logging in with it in phpMyAdmin.