The WITH GRANT OPTION clause gives the user the ability to give to other users any privileges the user has at the specified privilege level. To grant the GRANT OPTION privilege to an account without otherwise changing its privileges, do this: GRANT USAGE ON *.The GRANT OPTION privilege allows a user to pass on any privileges she has to other users. Consider an example, which we’ve run when connected to the monitor as the root user: mysql> GRANT ALL ON music.* TO ‘hugh’@’localhost’; Query OK, 0 rows affected (0.00 sec) mysql> GRANT GRANT OPTION ON music.*
What is grant option?
The WITH GRANT OPTION keywords convey the privilege or role to a user with the right to grant the same privileges or role to other users. You create a chain of privileges that begins with you and extends to user as well as to whomever user subsequently conveys the right to grant privileges.
How do I grant access to MySQL?
To GRANT ALL privileges to a user , allowing that user full control over a specific database , use the following syntax: mysql> GRANT ALL PRIVILEGES ON database_name. * TO ‘username’@’localhost’;