Had this issue pop up when helping a friend out.
As dougie pointed out, mariadb by default authenticates against the current user. This can be seen by only being able to log in the database console from the root user account. This is regardless of what password you may set via mysql_secure_install.
This behaviour can be reverted to how it was before by:
sudo mysql -u root
MariaDB [none] use mysql;
MariaDB [mysql] update user set plugin='' where User='root';
MariaDB [mysql] flush privileges;
This was adapted from: https://stackoverflow.com/questions/308 ... ord-prompt