v.20.6Improvement
Improved REVOKE Command with Conditional Grant/Admin Option Requirements
ImprovedREVOKEcommand: now it requires grant/admin option for only access which will be revoked. For example, to executeREVOKE ALL ON . FROM user1now it does not require to have full access rights granted with grant option. Added commandREVOKE ALL FROM user1- it revokes all granted roles fromuser1. #12083 (Vitaly Baranov).
Why it matters
This feature simplifies privilege management by reducing the need for users to have full access rights with grant option when revoking privileges partially, and provides a convenient command to revoke all roles from a user at once, improving security and usability.How to use it
To revoke specific privileges, useREVOKE as before, but now you only need grant/admin option on the rights being revoked, for example:REVOKE ALL ON . FROM user1To remove all roles granted to a user, use:
REVOKE ALL FROM user1