Score:0

Restore root login via 'sudo mariadb' command

in flag

After mysql_secure_installation, sudo mariadb command does not seem to work anymore with the following error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Does anyone know how to restore the login via sudo mariadb command?

Version Info
  • MariaDB: 10.3.32
  • Ubuntu: 20.04.1

Thanks!

Score:1
in flag

Well, I needed to switch from password-based authentication to unix-socket authentication.

I ran this command to change the authentication method for my root user.

alter user 'root'@'localhost' identified via unix_socket;

References:

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.