Do you want to follow the flush privileges after the grant

grant statement will modify the data sheet and memory, judgment privileges while when using memory data. So specification to grant and revoke statements are not required plus flush privileges statement.
 
flush privileges statement itself will be used to rebuild a data table memory permission data, re-use authority in the case of data may be inconsistent.
 

When we modify the permissions system tables directly through SQL statements to modify permissions, the permissions cache is not updated, this will lead to inconsistent permissions cache and system tables. So after modifying permissions this way, you should do FLUSH PRIVILEGES to refresh the cache, so that the rights of the update to take effect.

To update permissions GRANT / REVOKE / CREATE USER / DROP USER does not require the FLUSH PRIVILEGES.

 

Guess you like

Origin www.cnblogs.com/liang545621/p/12606843.html