mysql.user

2025-11-14 07:33:33  Updated

Note

This view is introduced since OceanBase Database V3.2.1.

Purpose

This view displays information about user-level privileges. It is a virtual table.

Columns

Column Type Nullable? Description
host varchar(128) NO The name of the host.
user varchar(128) NO The username.
password varchar(128) NO The password of the user.
select_priv varchar(1) NO Indicates whether the user can execute the SELECT statement.
insert_priv varchar(1) NO Indicates whether the user can execute the INSERT statement.
update_priv varchar(1) NO Indicates whether the user can execute the UPDATE statement.
delete_priv varchar(1) NO Indicates whether the user can execute the DELETE statement.
create_priv varchar(1) NO Indicates whether the user can execute the CREATE statement.
drop_priv varchar(1) NO Indicates whether the user can execute the DROP statement.
reload_priv varchar(1) NO Indicates whether the user can execute the FLUSH statement. At present, this column is not used.
shutdown_priv varchar(1) NO Indicates whether the user can run the shutdown command. At present, this column is not used.
process_priv varchar(1) NO Indicates whether the user can query information about active threads.
file_priv varchar(1) NO Indicates whether the user has the file read and write privilege. At present, this column is not used.
grant_priv varchar(1) NO Indicates whether the user can execute the GRANT statement.
reference_priv varchar(1) NO This column is not used.
index_priv varchar(1) NO Indicates whether the user can create indexes.
alter_priv varchar(1) NO Indicates whether the user can execute the ALTER statement.
show_db_priv varchar(1) NO Indicates whether the user can execute theSHOW DATABASE statement.
super_priv varchar(1) NO Indicates whether the user can execute superuser statements.
create_tmp_table_priv varchar(1) NO Indicates whether the user can create temporary tables. At present, this column is not used.
lock_tables_priv varchar(1) NO Indicates whether the user can execute the LOCK TABLES statement. At present, this column is not used.
execute_priv varchar(1) NO Indicates whether the user can execute stored procedures. At present, this column is not used.
repl_slave_priv varchar(1) NO This column is not used.
repl_client_priv varchar(1) NO This column is not used.
create_view_priv varchar(1) NO Indicates whether the user can create views.
show_view_priv varchar(1) NO Indicates whether the user can execute the SHOW CREATE VIEW statement.
create_routine_priv varchar(1) NO Indicates whether the user can create stored procedures. At present, this column is not used.
alter_routine_priv varchar(1) NO Indicates whether the user can modify stored procedures. At present, this column is not used.
create_user_priv varchar(1) NO Indicates whether the user can execute the CREATE USER statement.
event_priv varchar(1) NO Indicates whether the user can create, modify, and delete events. At present, this column is not used.
trigger_priv varchar(1) NO Indicates whether the user has the privilege to execute triggers. At present, this column is not used.
create_tablespace_priv varchar(1) NO Indicates whether the user can create tablespaces. At present, this column is not used.
ssl_type varchar(10) NO At present, this column is not used.
ssl_cipher varchar(1024) NO At present, this column is not used.
x509_issuer varchar(1024) NO At present, this column is not used.
x509_subject varchar(1024) NO At present, this column is not used.
max_questions bigint(20) NO The maximum number of queries that a user can perform per hour. This column is not used.
max_updates bigint(20) NO The maximum number of updates that a user can perform per hour. At present, this column is not used.
max_connections bigint(20) NO The maximum number of connections that a user can receive per hour. At present, this column is not used.
max_user_connections bigint(20) NO The maximum number of simultaneous request connections. At present, this column is not used.
plugin varchar(1024) NO At present, this column is not used.
authentication_string varchar(1024) NO At present, this column is not used.
password_expired varchar(1) NO Indicates whether the user password has expired. At present, this column is not used.
account_locked varchar(1) NO Indicates whether the user has been locked.
drop_database_link_priv varchar(1) NO Indicates whether the database link can be dropped.
create_database_link_priv varchar(1) NO Indicates whether the database link can be created.
create_role_priv varchar(1) NO Indicates whether a role can be created .
drop_role_priv varchar(1) NO Indicates whether a role can be dropped

Sample query

query the global privilege information of user test3.

obclient [oceanbase]> SELECT * FROM mysql.user WHERE user=‘'test3'\G

The query result is as follows:

*************************** 1. row ***************************
                     host: %
                     user: test3
                 password: *************************************
              select_priv: N
              insert_priv: N
              update_priv: N
              delete_priv: N
              create_priv: N
                drop_priv: N
              reload_priv: N
            shutdown_priv: N
             process_priv: N
                file_priv: N
               grant_priv: N
          references_priv: N
               index_priv: N
               alter_priv: N
             show_db_priv: N
               super_priv: N
    create_tmp_table_priv: N
         lock_tables_priv: N
             execute_priv: N
          repl_slave_priv: N
         repl_client_priv: N
         create_view_priv: N
           show_view_priv: N
      create_routine_priv: N
       alter_routine_priv: N
         create_user_priv: N
               event_priv: N
             trigger_priv: N
   create_tablespace_priv: N
                 ssl_type:
               ssl_cipher:
              x509_issuer:
             x509_subject:
            max_questions: 0
              max_updates: 0
          max_connections: 0
     max_user_connections: 0
                   plugin: ob_native_password
    authentication_string:
         password_expired:
           account_locked: N
  drop_database_link_priv: N
create_database_link_priv: N
         create_role_priv: N
           drop_role_priv: N
1 row in set

Contact Us