The full MariaDB error message was : DBI connect failed : Access denied for user 'root'@'localhost' (using password: YES) code example
Example: access denied for user 'root'@'localhost' mariadb
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root' AND plugin = 'unix_socket';
FLUSH PRIVILEGES;