Not the answer you need?
Register and ask your own question!

why do grants switch from granular to ALL after granting "lock tables"

grosenthalgrosenthal EntrantCurrent User Role Supporter

We have a role with all these permissions.

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON db.* to rolea

As soon as i grant 'lock tables' to the role it no longer displays individual roles after executing show grants. It now simply says grant all privs

GRANT ALL PRIVILEGES ON db.* to rolea


Any idea why?

+-----------+

| @@version |

+-----------+

| 8.0.21-12 |

+-----------+

Answers

  • matthewbmatthewb Senior [email protected] Percona Staff Role

    I imagine this is a simple code check within core mysql. If you have all the flags then display 'ALL' otherwise show them individually. Have you tried using pt-show-grants instead? I believe this tool will show you all individual flags.

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.