content_image/857977.jpg
and password_lock_time_days  keys indicating the value of such options as have been specified for the account. If a key is missing, its value is implicitly 0. If a key value is implicitly or explicitly 0, the corresponding capability is disabled. This attribute was added in MySQL 8.0.19. 

If no attributes apply, User_attributes  is NULL . 

Example: An account that has a secondary password and partially revoked database privileges has additional_password  and Restrictions  attributes in the column value: 

## The tables_priv and columns_priv Grant Tables 

mysql> SELECT User_attributes FROM mysql.User WHERE User = ’u’\G *************************** 1. row *************************** User_attributes: {"Restrictions": [{"Database": "mysql", "Privileges": ["SELECT"]}], "additional_password": " hashed_credentials "} 

To determine which attributes are present, use the JSON_KEYS()  function: 

SELECT User, Host, JSON_KEYS(User_attributes) FROM mysql.user WHERE User_attributes IS NOT NULL; 

To extract a particular attribute, such as Restrictions , do this: 

SELECT User, Host, User_attributes->>’$.Restrictions’ FROM mysql.user WHERE User_attributes->>’$.Restrictions’ <> ’’; 

During the second stage of access control, the server performs request verification to ensure that each client has sufficient privileges for each request that it issues. In addition to the user  and db  grant tables, the server may also consult the tables_priv  and columns_priv  tables for requests that involve tables. The latter tables provide finer privilege control at the table and column levels. They have the columns shown in the following table. 

<img src='content_image/857977.jpg'>

The Timestamp  and Grantor  columns are set to the current timestamp and the CURRENT_USER  value, respectively, but are otherwise unused. 

## The procs_priv Grant Table 

For verification of requests that involve stored routines, the server may consult the procs_priv  table, which has the columns shown in the following table. 

