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
Had the same issue. Executing with Super user privileges worked for me.
sudo mysql -u root -p
您是否尝试省略-p进行免费密码登录?
mysql -u root
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.