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!
1 Answer
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: