MySQL RDS - Associating a user to a group fails with "Error Code: 1227. Access denied"

0

I am connected to MySQL RDS instance of our database with super admin privileges. When I execute the following statements below it results in error

Error Code: 1227. Access denied; you need (at least one of) the WITH ADMIN, ROLE_ADMIN, SUPER privilege(s) for this operation 0.047 sec

CREATE ROLE read_only_user; GRANT SELECT on * TO read_only_user; grant 'read_only_user' TO 'myuser@company.com';

We are in the process of migrating to Aurora and the same stamens works fine in an Auora instance of the database.

vlaiosa
gefragt vor 5 Monaten408 Aufrufe
1 Antwort
0

Take a look at this post: https://repost.aws/knowledge-center/duplicate-master-user-mysql

Error Code 1227 - Access Denied: This error suggests that your current user account does not have sufficient privileges to perform the operation you are attempting.

Verify Your Privileges: First, ensure that your user account truly has super admin privileges. You can check this by executing the following SQL command: SHOW GRANTS FOR 'yourusername'@'yourhost';

beantwortet vor 5 Monaten
  • My user does have super admin privileges (see below). Also, I have an instance of a MySQL Aurora database with the same super admin privileges and it works fine.

    GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE ROLE, DROP ROLE ON . TO admin@% WITH GRANT OPTION GRANT APPLICATION_PASSWORD_ADMIN,BACKUP_ADMIN,FLUSH_OPTIMIZER_COSTS,FLUSH_STATUS,FLUSH_TABLES,FLUSH_USER_RESOURCES,INNODB_REDO_LOG_ARCHIVE,PASSWORDLESS_USER_ADMIN,SHOW_ROUTINE ON . TO admin@% WITH GRANT OPTION

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen