Here is the solution for similar problem:
Other ways of (re)setting the mariadb root password:
Using phpmyadmin.