If it is not possible to reset the MySQL/MariaDB root password using WHM under "SQL Services » MySQL Root Password" then the following can be used to manually reset the password.
Create a temporary file that will be readable by the mysql user like
Then obtain the root passowrd for MySQL/MariaDB in /root/.my.cnf
Next modify /tmp/tmpinfo and copy and paste the following into that file updating the password.
ALTER USER 'root'@'localhost' IDENTIFIED BY 'PASSWORD';
Next shutdown mysql
Then access a shell as the mysql user with
sudo -i su -l mysql -s/bin/bash
and then use the file created to start MyQL with
mysqld --init-file=/tmp/tmpinfo &
and then test access to MySQL/MariaDB.
Afterward exit the mysql shell and restart MariaDB with
and remove the temporary file
/bin/rm -f /tmp/tmpinfo