Account Management Statements The  GRANT  statement assigns privileges and roles to MySQL user accounts and roles. There are several aspects to the  GRANT  statement, described under the following topics: •GRANT General Overview •Object Quoting Guidelines •Account Names •Privileges Supported by MySQL •Global Privileges •Database Privileges •Table Privileges •Column Privileges •Stored Routine Privileges •Proxy User Privileges •Granting Roles •The  AS  Clause and Privilege Restrictions •Other Account Characteristics •MySQL and Standard SQL Versions of GRANT GRANT General Overview The  GRANT  statement enables system administrators to grant privileges and roles, which can be granted to user accounts and roles. These syntax restrictions apply: • GRANT  cannot mix granting both privileges and roles in the same statement. A given  GRANT  statement must grant either privileges or roles. •The  ON  clause distinguishes whether the statement grants privileges or roles: •With  ON , the statement grants privileges. •Without  ON , the statement grants roles. •It is permitted to assign both privileges and roles to an account, but you must use separate  GRANT statements, each with syntax appropriate to what is to be granted. For more information about roles, see Section 6.2.10, “Using Roles” . To grant a privilege with  GRANT , you must have the  GRANT OPTION  privilege, and you must have the privileges that you are granting. (Alternatively, if you have the  UPDATE  privilege for the grant tables in the mysql  system schema, you can grant any account any privilege.) When the  read_only  system variable is enabled,  GRANT  additionally requires the  CONNECTION_ADMIN  privilege (or the deprecated  SUPER privilege). GRANT  either succeeds for all named users and roles or rolls back and has no effect if any error occurs. The statement is written to the binary log only if it succeeds for all named users and roles. The  REVOKE  statement is related to  GRANT  and enables administrators to remove account privileges. See Section 13.7.1.8, “REVOKE Statement” . 2864