What is the role of `FLUSH PRIVILEGES;` after using `GRANT` or `REVOKE`?

Responsive Ad Header

Question

Grade: Education Subject: Support
What is the role of `FLUSH PRIVILEGES;` after using `GRANT` or `REVOKE`?
Asked by:
72 Viewed 72 Answers

Answer (72)

Best Answer
(269)
`FLUSH PRIVILEGES;` tells the MariaDB server to reload the grant tables. Without it, the changes made by `GRANT` or `REVOKE` might not take effect immediately, and you'll continue to receive error 1044 even after granting the necessary permissions. It's a crucial step.