For some unknown reason when I installed mariadb (currently ver 10.5 on my Manjaro linux). it wouldn't let me login without sudo. So i investigated (and i used that that authentication plugin unix_socket and mysql_native_password etc thing; to no avail unfortunately, because user table is no longer a table but a view); later I find out using MariaDB authentication mariadb documentation; that the password for root and mysql are invalid in the mysql.grobal_priv table.
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypass');
and also changed mysql password
SET PASSWORD FOR 'mysql'@'localhost' = PASSWORD('pass');
Now i can login without password, but my question is
- why did it happened. I did set the password on mysql_secure_installation command.
- Is setting this way (which sets authentication_string and Password same) is all I needed to do.
FYI: I did used special symbols !@ in my password. Maybe bash console had some part in this invalid password initialization. Just guessing