3
votes

I just installed MySQL server on my Ubuntu machine. All installed ok, when it asked for my password, I simply hit 'enter' so as to leave the password blank. Now when I try to login:

mysql -u root -p

and simply hit enter, I get the following error:

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

I don't understand what the error is or how to fix it. Please can someone help? I've tried to read the MYSQL Docs but I don't understand what they're saying.

I also get an "Access Denied" page when I try to access phpMyAdmin

2
See at here - tnductam
maybe this is helpofull for you stackoverflow.com/questions/39281594/… - Kashif

2 Answers

7
votes

Had the same issue. Executing with Super user privileges worked for me.

sudo mysql -u root -p
0
votes

Have you tried to ommit -p for password free login?

mysql -u root