I am struggling with granting privileges to mysql user.
I tried following command:
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' IDENTIFIED BY 'userpassword' WITH GRANT OPTION;
But it returns following error:
ERROR 1045 (28000): Access denied for user 'mysun'@'localhost' (using password: YES)
I know that this is indicating to wrong password, but I am sure that my password is correct, now what can be the issue, Please suggest if anybody knows the solution to this problem.
Update :
mysql> SHOW GRANTS;
+------------------------------------------------+
Grants for mysun@localhost
+------------------------------------------------+
GRANT USAGE ON *.* TO 'mysun'@'localhost' IDENTIFIED BY PASSWORD
GRANT ALL PRIVILEGES ONxxxx_xxxxx
.* TO 'mysun'@'localhost'
GRANT ALL PRIVILEGES ONxxxx_xxxxxxxx
.* TO 'mysun'@'localhost'
GRANT ALL PRIVILEGES ONxxxx_xxxxxxxxx
.* TO 'mysun'@'localhost'
+------------------------------------------------+
4 rows in set (0.00 sec)