(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

(Solved) (Fixed )MariaDB Unmet Dependencies on Ubuntu 20.04.

Solution to Moodle Error: Coding error detected, it must be fixed by a programmer: Failed to unserialise data from file. Either failed to read, or failed to write.

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.