Sunday, 9 September 2018

Revoking Privileges from Users Using MySQL REVOKE



To revoke privileges from a user account, the MySQL REVOKE statement will use to revoke the access/grants one or more privileges or all privileges from a user.

Run the following command to revoke privileges from a database user:

mysql> REVOKE ALL PRIVILEGES, GRANT OPTION FROM username@<IP address/hostname>;
mysql> FLUSH PRIVILEGES;

Verify the privileges using following MySQL SHOW statement for user:

mysql> SHOW GRANTS FOR username@<IP address/hostname>;

Done!!!

No comments:

Post a Comment