remove privileges mysql code example
Example 1: revokeprivileges mysql
REVOKE ALL ON dbname.* FROM 'username'@'localhost';
Example 2: grant revoke privileges to mysql username
GRANT ALL PRIVILEGES ON * . * TO 'username'@'localhost';
FLUSH PRIVILEGES;
SHOW GRANTS FOR 'username'@'localhost';
REVOKE type_of_permission ON database_name.table_name FROM 'username'@'localhost';
Example 3: mysql remove user privileges
REVOKE ALL PRIVILEGES ON database_name.* FROM 'username'@'host';
OR
DROP USER 'username'@'host';