(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
Post a Comment