Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.31 KB

sql-statement-flush-privileges.md

File metadata and controls

42 lines (30 loc) · 1.31 KB
title summary aliases
FLUSH PRIVILEGES | TiDB SQL Statement Reference
An overview of the usage of FLUSH PRIVILEGES for the TiDB database.
/docs/dev/sql-statements/sql-statement-flush-privileges/
/docs/dev/reference/sql/statements/flush-privileges/

FLUSH PRIVILEGES

This statement triggers TiDB to reload the in-memory copy of privileges from the privilege tables. You should execute FLUSH PRIVILEGES after making manual edits to tables such as mysql.user. Executing this statement is not required after using privilege statements such as GRANT or REVOKE. Executing this statement requires the RELOAD privilege.

Synopsis

FlushStmt ::=
    'FLUSH' NoWriteToBinLogAliasOpt FlushOption

NoWriteToBinLogAliasOpt ::=
    ( 'NO_WRITE_TO_BINLOG' | 'LOCAL' )?

FlushOption ::=
    'PRIVILEGES'
|   'STATUS'
|    'TIDB' 'PLUGINS' PluginNameList
|    'HOSTS'
|   LogTypeOpt 'LOGS'
|   TableOrTables TableNameListOpt WithReadLockOpt

Examples

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

MySQL compatibility

This statement is understood to be fully compatible with MySQL. Any compatibility differences should be reported via an issue on GitHub.

See also