MySQL permissions table, which controls user access to the database, exists in the MySQL database, initialized by mysql_install_db, including User,db,host,tables_priv,columns_priv,procs_priv
1. User table that records account information that is allowed to connect to the server, with a global level of permissions.
- User columns (including Host,user,password, which are the federated primary keys of the user table),
- Permissions column, which describes user permissions, values n or Y, and the default value is N, which is required by grant or update
- Security column
- n Two SSL-related, for encryption,show variables like ' Have_openssl ' to see if SSL is supported
- N two X509-related, used to mark a user
- N plugin is used to authenticate the user and, if empty, the server authenticates the user using the built-in authorization authentication mechanism
- N authentication_string
- Resource control columns, containing three fields, restricting the resources used by the user (MAX_XXXXXXX)
2. DB table and Host table
The DB table records the user's access to a database and determines which host the user can manipulate from which database;
The host table records the use rights of hosts for a database, and the DB table controls the database-level operation permissions on a given host
The host table is not affected by GRANT and revoke
- User columns
- The DB table contains HOST,USER,DB (the three DB table Federated primary key) that identifies the operation permissions of a user to a database from a host
- Host table not yo user information, only host and DB
- Permissions column, two tables approximately the same
3. Tables_priv tables are used to set operation permissions on tables
4. Colums_priv table sets operation permissions on a column of a table
COLUMN_NAME used to specify which data columns have operation permissions
5. Procs_priv table, setting operation permissions on stored procedures and stored functions
Routine_name, Routine_type (' function ', ' procedure ') indicate the name and type of the stored procedure or stored function
MySQL Learning notes MySQL permissions table