If mariadb is letting user login without password, do the following
as mentoined on webpage: https://serverfault.com/questions/391354/mysql-permits-passwordless-logins-wont-let-me-run-anything

mysql -uroot -p -e"DELETE FROM mysql.user WHERE user=''; FLUSH PRIVILEGES;"
mysql -uroot -p -e"DELETE FROM mysql.db WHERE LEFT(db,4)='test'; FLUSH PRIVILEGES;"



Also s

On centos mariadb can be restarteds as:  systemctl restart mariadb.service
