Access denied for user 'root'@'%'
I am able to login fine :
mysql -u root -p
mysql> GRANT SELECT, LOCK TABLES,EXECUTE ON `dbname`.* TO 'dbuser'@'xx.xx.xx.xx' IDENTIFIED BY '[password]' WITH GRANT OPTION;
ERROR 1044 (42000): Access denied for user 'dbuser'@'xx.xx.xx.xx' to database 'dbanme'
SELECT `User`, `Grant_priv` FROM `mysql`.`user` WHERE `User` = 'root';
You will probably notice it returns a 'N' for Grant_priv. So do this:
UPDATE `mysql`.`user` SET `Grant_priv` = 'Y' WHERE `User` = 'root';
FLUSH PRIVILEGES;
SELECT `User`, `Grant_priv` FROM `mysql`.`user`;
I am able to login fine :
mysql -u root -p
mysql> GRANT SELECT, LOCK TABLES,EXECUTE ON `dbname`.* TO 'dbuser'@'xx.xx.xx.xx' IDENTIFIED BY '[password]' WITH GRANT OPTION;
ERROR 1044 (42000): Access denied for user 'dbuser'@'xx.xx.xx.xx' to database 'dbanme'
SELECT `User`, `Grant_priv` FROM `mysql`.`user` WHERE `User` = 'root';
You will probably notice it returns a 'N' for Grant_priv. So do this:
UPDATE `mysql`.`user` SET `Grant_priv` = 'Y' WHERE `User` = 'root';
FLUSH PRIVILEGES;
SELECT `User`, `Grant_priv` FROM `mysql`.`user`;
No comments:
Post a Comment