语句如下:
grant_stmt:
GRANT privilege_type_list ON privilege_level TO user_option_list [WITH GRANT OPTION];
revoke_stmt:
REVOKE privilege_type_list ON privilege_level FROM user_name_list;
show_grants_stmt:
SHOW GRANTS [FOR user_name];
privilege_type_list:
{ALL [PRIVILEGES] | privilege_type [, privilege_type ...]}
privilege_type:
ALTER
| CREATE
| CREATE USER
| CREATE VIEW
| DELETE
| DROP
| GRANT OPTION
| INDEX
| INSERT
| PROCESS
| SELECT
| SHOW DATABASES
| SHOW VIEW
| SUPER
| UPDATE
| USAGE
privilege_level:
*
| *.*
| database_name.*
| database_name.table_name
| table_name
user_option_list:
user_option [, user_option ...]
user_option:
user_name [IDENTIFIED BY 'password']
password:
STR_VALUE
user_name_list:
user_name [, user_name ...]