lundi 1 juin 2015

UPDATE command denied to user 'Username'@'xx.xx.xx.xx' for table 'tablename'

My application on ec2 instanace connects to RDS. Select queries in stored procedures works fine by on executing update i get following error.

MySql.Data.MySqlClient.MySqlException: UPDATE command denied to user 'Root'@'xx.xx.xx.xx' for table 'tablename'

To fix above issue, I am trying to grant privileged using mysql workbench/mysql command,

GRANT ALL PRIVILEGES ON DBNAME.* TO Root@'%'  IDENTIFIED BY  'PASSWORD'  WITH GRANT OPTION;

But I get following error

Error Code: 1044. Access denied for user 'Root'@'xx.xx.xx.xx' to database 'DBNAME'

The problem seems to be user(Root@ec2endpoint) and CURRENT_USER(Root@MYLOCALIP) are different in SELECT USER(),CURRENT_USER();.

Any help how to fix these issues? I think there must be right way to do all this, my security group and parameter group looks fine too.




Aucun commentaire:

Enregistrer un commentaire