What is GRANT OPTION in MariaDB

What is GRANT OPTION in MariaDB

If you want the user to grant privilleges to other users , you can use WITH GRANT OPTION. The user will be only able to GRANT the permissions he/she has.

Syntax:

MariaDB > GRANT Permission ON Object/s to 'USER'@'Host' WITH GRANT OPTION;

Example : 
Let's say that if we are providing SELECT permission to TB USER on TechBrothers Database. We want to provide permission to TB so he can provide SELECT permission to other user if want. When we will be providing SELECT permission to TB, we will use WITH GRANT OPTION.

MariaDB > GRANT Select ON TechBrothers.* to 'TB'@'localhost' WITH GRANT OPTION;

2 comments: