MySQL has the following permissions:
1. Global Level:
Global Level permission control is also called Global permission control. All permission information is stored in the mysql. user table.
All permissions of Global Level are for the entire mysqld and are valid for all tables and fields in all databases.
Grant select, UPDATE, DELETE, insert on *. * TO 'def '@ 'localhost ';
Global Level has the following permissions)
2. Database Level
Database Level has a scope of all objects in the specified Database.
Grant alter on test. * TO 'def '@ 'localhost ';
Grant drop on * TO 'def '@ 'localhost ';
Database Level has the following permissions: create user, FILE, PROCESS, RELOAD,
Replication client, replication slave,
Show databases, SHUTDOWN, SUPER, and USAGE permissions are not added.
3. Table Level
The Table Level Permission applies to the specified Table of the database specified in the authorization statement.
Grant index on test. t1 TO 'abc' @ '% .jianzhaoyang.com ';
Table Level permissions are limited to a specific Table, so there are few permission types, only
ALTER, CREATE, DELETE, DROP, INDEX, INSERT, select update.
4. Column Level
The permission of Column Level has a smaller scope. It is only a specified (active) Column of a table.
Grant select (id, value) ON test. t2 TO 'abc' @ '%. XXX ';
Column-Level permissions include INSERT, SELECT, and UPDATE.
5. Routine Level
Routine Level mainly targets the procedure and function objects. When granting Routine Level permissions, you must specify the database and related objects.
Grant execute on test. p1 to 'abc' @ 'localhost ';
Routine Level has only two permissions: EXECUTE and alter routine.