By default MariaDB use the unix_socket
plugin to authenticate users.
But it's easier to use mysql_native_password
for dev (and only for dev because it's way less secure).
Get root access
sudo su
Connect to mysql
mysql
Run this query
update mysql.user set plugin = 'mysql_native_password' where User = 'root';
And then
flush privileges;
Enjoy !