FLUSH PRIVILEGES
FLUSH PRIVILEGES is a SQL statement in the Administration category. Reloads the grant tables from memory. Required after direct INSERT/UPDATE/DELETE on mysql.* tables. The syntax is FLUSH PRIVILEGES;. It returns privileges reloaded. A typical example: -- After manually editing user privileges: UPDATE mysql.user SET Super_priv = 'Y' WHERE User = 'admin'; FLUSH PRIVILEGES; -- Apply changes immediately A close relative is CREATE USER, which creates a new database user account. A close relative is GRANT, which grants specific privileges (SELECT, INSERT, UPDATE, DELETE, ALL) to a user on a database/table. A close relative is REVOKE, which removes previously granted privileges from a user. More about this category: Database administration — CREATE DATABASE, GRANT, REVOKE, SHOW, DESCRIBE. Related Administration entries: CREATE USER, GRANT, REVOKE, SHOW TABLES, DESCRIBE / DESC, SHOW INDEX, SHOW CREATE TABLE, SHOW DATABASES. This page is part of the free SQL Reference documentation covering 762+ statements, functions, and clauses, each with syntax, parameters, return values, and examples for MySQL, PostgreSQL, SQL Server, and SQLite.