Which tables are used to control the privileges of MySQL database server?

MySQLMySQLi Database

When we install MySQL server, a database named MySQL created automatically. This MySQL database contains five main grant tables with the help of which MySQL server can control the privileges of MySQL database server. These tables are as follows −

user table

This table contains user account and global privileges columns. MySQL uses the user table to either accept or reject a connection from a host. A privilege granted in the user table is effective to all databases on the MySQL server.

db table

This table contains database-level privileges. MySQL uses the db table to determine which database a user can access and from which host. A privilege granted at the database level in the db table applies to the database and all objects belong to that database e.g., tables, triggers, views, stored procedures, etc.

table_priv

This table contains table-level privileges. A privilege granted in the table_priv table applies to the table and its columns.

columns_priv

This table contains column-level privileges. A privilege granted in the columns_priv table applies only to a specific column of a table.

procs_priv

This table contains stored functions and stored procedures privileges.

raja
Published on 20-Feb-2018 13:08:31
Advertisements