Today I did a login as root into Ubuntu 14.04.1 LTS ll
and then apt-get install mariadb-server (without sudo but as root).
With mySQL -h l
System like Ubuntu prefers to use auth_socket plugin. It will try to authenticate by comparing your username in DB and process which makes mysql request; it is described in here
The socket plugin checks whether the socket user name (the operating system user name) matches the MySQL user name specified by the client program to the server, and permits the connection only if the names match.
Instead you may want to back with the mysql_native_password, which will require user/password to authenticate.
About the method to achieve that, I recommend this instead.