ÃֽŠ°Ô½Ã±Û(DB)
2020.11.25 / 24:38

MySQL ERROR 1045 (28000): Access denied for user ''@'localhost' (using password: YES)

Ãß¼®µ¹ÀÌ
Ãßõ ¼ö 178

MySQL ERROR 1045 (28000): Access denied for user ''@'localhost' (using password: YES)


First let me mention that I've gone through many suggested questions and found no relevent answer. Here is what I'm doing.

I'm connected to my Amazon EC2 instance. I can login with MySQL root with this command:

mysql -u root -p

Then I created a new user bill with host %

CREATE USER 'bill'@'%' IDENTIFIED BY 'passpass';

Granted all the privileges to user bill:

grant all privileges on *.* to 'bill'@'%' with grant option;

Then I exit from root user and try to login with bill:

mysql -u bill -p

entered the correct password and got this error:

ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)


->

~$ mysql -u root -p
Enter Password:

mysql> grant all privileges on *.* to bill@localhost identified by 'pass' with grant option;