troubleshooting Question

Is there a way I can grant roles to user in AWS RDS rather directly granting privileges to users?

Avatar of Thyagaraj03
Thyagaraj03 asked on
AWSAWS RDSMySQL ServerCloud ServicesDatabases
11 Comments1 Solution48 ViewsLast Modified:

How to grant MySQL(8) roles to users in AWS RDS?. The following queries work on mysql servers other than AWS RDS MySQL. 

create role 'ReadRole';
grant select on *.* to 'ReadRole';
create user 'user1'@'%' identified by 'secret';
grant 'ReadRole' to 'user1'@'%';

When I execute the same on RDS with the default mysql account created, I will end up with the following error,

ERROR 1227 (42000): Access denied; you need (at least one of) the WITH ADMIN, ROLE_ADMIN, SUPER privilege(s) for this operation 
Tomas Helgi Johannsson
Database Administrator / Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros