I installed mysql in Ubuntu 20.04.
Problem -
Case 1: I have default root user. I can login using
sudo mysql
but cannot login usingmysql -u root -p
.
Case 2: I created another user 'local'. I can login using
mysql -u local -p
and by giving password I set. But problem is if I give wrong password, it still logs me in. I don't know why.
I followed this ERROR 1698 (28000): Access denied for user 'root'@'localhost' but this didn't help me. I followed other topics too like creating new user for mysql etc. I cannot access from workbench or from python script too.
Error : ERROR 1698 (28000): Access denied for user 'root'@'localhost'