Mariadb server 10.0.23(PKG)

While I have installed mariadb server and clinet from pkg it didn’t asked any password but if I try to login with root and other pass it doesn't let me login. Can any one please guide me where I am being wrong.
Tried with blank password yet cant logged in. :(
The default install shouldn't have a password for root. But it is limited to logging in from localhost. Did you perhaps change the hostname after the initial install of MySQL?