MySQL Learning notes MySQL permissions table

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.