TiDBTiDB Docs Dash 2024

Jan 9 - Jan 12 (UTC)
Join us to improve docs and win a prize!
Sign InTry Free

FLUSH PRIVILEGES

The statement FLUSH PRIVILEGES instructs TiDB to reload the in-memory copy of privileges from the privilege tables. You must execute this statement after manually editing tables such as mysql.user. However, executing this statement is not necessary after using privilege statements like GRANT or REVOKE. To execute this statement, the RELOAD privilege is required.

Synopsis

FlushStmt
FLUSHNoWriteToBinLogAliasOptFlushOption
NoWriteToBinLogAliasOpt
NO_WRITE_TO_BINLOGLOCAL
FlushOption
PRIVILEGESSTATUSTIDBPLUGINSPluginNameListHOSTSLogTypeOptLOGSTableOrTablesTableNameListOptWithReadLockOpt

Examples

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

MySQL compatibility

The FLUSH PRIVILEGES statement in TiDB is fully compatible with MySQL. If you find any compatibility differences, report a bug.

See also

Was this page helpful?

Download PDFRequest docs changesAsk questions on Discord
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.