Privileges
In addition to database level permissions, each user is associated to a subset of the following SQL privileges:
SELECTCREATEINSERTUPDATEDELETEDROPALTER
Each privilege grants the possibility to execute the corresponding SQL statement. Any attempt to run a statement without owning the corresponding privilege will be promply blocked by the ErrAccessDenied error.
Show privileges#
To show the SQL privileges associated to users, you can use the following statements:
1SHOW GRANTS; -- show all users privileges
2
3SHOW GRANTS FOR user; -- show the list of privileges connected to a specific userAlter privileges#
Users with admin permission can grant and revoke SQL privileges to other users:
1GRANT ALL PRIVILEGES TO myuser; -- grant all privileges to user
2
3REVOKE SELECT, UPDATE ON DATABASE mydb TO USER myuser; -- revoke specific privileges to user
Edit this page on GitHub
Last updated