Important

You are viewing the documentation of TiDB v6.0 (DMR). PingCAP does not provide bug fixes for v6.0. Any bugs will be fixed in future releases.

For general purposes, please use the latest LTS version of the TiDB database.

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
FLUSHNoWriteToBinLogAliasOptFlushOption
NoWriteToBinLogAliasOpt
NO_WRITE_TO_BINLOGLOCAL
FlushOption
PRIVILEGESSTATUSTIDBPLUGINSPluginNameListHOSTSLogTypeOptLOGSTableOrTablesTableNameListOptWithReadLockOpt

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

Was this page helpful?