MySQL - Unable to login with password, but without password its working I have a master-slave setup, Slave is not in read only mode.(we can do all writes). 
I have created a user.

create user 'bhuvi'@'%' identified by 'bhuvi';
grant all privileges on *.* to 'bhuvi'@'localhost';
flush privileges;


But when I try to login, its showing 

[root@1user]# mysql -u bhuvi -p
Enter password:
ERROR 1045 (28000): Access denied for user 'bhuvi'@'localhost' (using password: YES)
[root@1user]#


But I can able to login with -p 

mysql -u bhuvi


I don't why its happening.
AndI tried to create users like `'user'@'localhost, this is working, But I don't know why the user has '%' is not working. 

(Im trying access the user login on the same server where the MySQL is installed)
network mask - is part of user name in MySQL 


create user 'bhuvi'@'%' identified by 'bhuvi'; - You are create user with password
grant all privileges on . to 'bhuvi'@'localhost'; - You create 2nd user without password




1st have password, but not privileges

2nd have all privileges, but not password