I am on Ubuntu. I did not set any password to my root account during the MySQL installation process. I am trying to run MySQL with
mysql -u root
However, I can't, ending up with the following access denied error.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Then, I thought it might be due to the password issue. I tried this and enter an empty password and hit the Enter key.
abc@ubuntu:~$ mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Then, I even tried entering a password (my user password on the computer). I ended up with this
abc@ubuntu:~$ mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I have seen some solutions, but most of them require to run MySQL first in order to resolve the issue. However, I find myself not able to do anything, stuck here.