Grant priv_type [column_list] [, priv_type [column_list]] ...
on [object_type]
{tbl_name | * | *.* | db_name.*}
to user
[Identified by [password] password] [,
user [Identified by [password] password]] ...
[with with_option [with_option] ...]
priv_types
ALL
Select Insert Update Delete
Create Drop Alter Index
Lock_tables
File
Create_tmp_table
Create_view Show_view
Create_routine Alter_routine Execute
Show_db
Grant Create_user
Reload Shutdown Process Super
object_types
table function procedure
with_options
Grant options
Max_Queries_per_hour count Max_updates_per_hour count
Max_Connections_per_Hour count
Max_user_connections count
show grants for user ;
Grant enables system administrators (or users who have thegrant privilege) to
create MySQL user accounts and to grant rights to/from accounts.
Revoke removes account privileges. See Help Revoke.
Privileges are granted at several levels:
Grant|Revoke all on *.* affect only global privileges.
Grant|Revoke all on db_name.* affect only database privileges.
Grant|Revoke all on db_name.tbl_name only table privileges.
Create Routine, Alter Routine, Execute, and Grant privileges
apply to stored routines (functions and procedures). They can be
granted at the global and database levels. Also, except for Create
Routine, these privileges can be granted at the routine level for
individual routines and are stored in the mysql.procs_priv table.
max_questions | max_updates | max_connections | max_user_connections
select host, user, select_priv sel, insert_priv ins, update_priv upd, delete_priv del, create_priv cre, drop_priv drp, grant_priv G, reload_priv R, shutdown_priv S, create_view_priv cv, show_view_priv sv from mysql.user;