(Solved) Mysql (MariaDB 10.+) login without password or with some random string.

 Even if you successfully set the mysql root password, mysql(MariaDb 10.+) allows you to login without any password or with any random string. 

Solution : the default mariaDB installations plugins like  'console' or 'unix_socket' allows us to login without password. Try following commands to solve the issue. 

mysql -u root -p 
use mysql;
SELECT host, user, password, plugin FROM mysql.user LIMIT 0,1;

---------------------------------------------------------------------------------
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
UPDATE mysql.user SET plugin = '' WHERE user = 'root' AND host = 'localhost';
FLUSH PRIVILEGES;


Comments

Popular posts from this blog

ACTION_FAILED:OU_INVALID: Solution for GoogleApps bulk user upload issue, username@domainname.com:ACTION_FAILED:OU_INVALID. This error is because you have not specified the Org Unit Path properly.

Email Notification in Koha! How to configure Email Notification in Koha 20.11 with postfix?

Moodle OAuth 2. This account is pending email confirmation! Solved