MySQL Tutorial/Data Dictionary/mysql Table

Материал из SQL эксперт
Перейти к: навигация, поиск

A bit about the "mysql" database.

MySQL server uses a database "mysql" to store the permission.

MySQL permissions work on a hierarchy of

  1. Host
  2. User
  3. Databases
  4. Tables
  5. Columns

25. 9. mysql Table 25. 9. 1. A bit about the "mysql" database. 25. 9. 2. <A href="/Tutorial/MySQL/0500__Data-Dictionary/MySQLpermissionsarestoredincorrespondingtables.htm">MySQL permissions are stored in corresponding tables</a>

MySQL permissions are stored in corresponding tables

columns_priv column privileges within a table db privileges for the databases func privileges for functions host privileges for the hosts tables_priv individual column privileges for a table user privileges for the access by users

In each table privileges for uses are set by "Y" or "N" in the appropriate column for a privilege.



mysql>
mysql> SELECT Host, Db, User, Select_priv
    -> FROM db WHERE (DB = "test");
mysql>