Score:1

Ubuntu 20.04 Mysql8 keep accepting null/any password for root

mx flag

After installing "mysql-server" on ubuntu20 and running "mysql_secure_installation" and setting a password the system still not authenticating correctly and still accepting any/blank password for mysql root user via linux root user while from other linux users its not accepting any.

mx flag
Just read everything about the new mysql auth plugins. Sorted now.
ua flag
Provide an Answer so others can benefit. (And you will get rep points for it.)
Score:0
mx flag

So basically by default Mysql now (on most distributions like Ubuntu/Debian) is using "caching_sha2_password" plugin for user authentication and "auth_socket" plugin for 'root' user. Previously it used to use "mysql_native_password".

"auth_socket" plugin does not require to set any password instead it uses the operating system credentials and pick the operating system logged-in username and authenticate the connecting user as the Mysql account that has the same user name i-e root -> root. So you dont need to any password for mysql root user.

You can execute following commands to check/change current auth plugin for a user.

select User,Host,Plugin from mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxxx';
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.