It is not difficult to revoke permissions and delete MySQL users. The following describes how to revoke permissions and delete MySQL users and the detailed steps, which may help you.
Revoke permissions and delete MySQL users:
To cancel a user's permissions, use the REVOKE statement. The syntax of REVOKE is very similar TO the GRANT statement, except that it is replaced by from without the indetifed by and with grant option clauses:
REVOKE privileges (columns) ON what FROM user
The user part must match the user part of the user you want to revoke permission from the original GRANT statement. Privileges does not need to be matched. You can use the GRANT statement to GRANT permissions, and then use the REVOKE statement to REVOKE only some permissions.
The REVOKE statement only deletes permissions, but does not delete users. Even if you revoke all permissions, the user records in the user table are retained, which means that the user can still connect to the server.
To completely Delete a MySQL user, you must use a Delete statement to explicitly Delete user records from the user table:
% Mysql-u root mysqlmysql> Delete FROM user-> Where User = "user_name" and Host = "host_name"; mysql> flush privileges;
The Delete statement deletes user records, while the FLUSH statement tells the server to overload the authorization table. When you use the GRANT and REVOKE statements, the table is automatically reloaded, but you do not modify the authorization table directly .)
How to implement a dynamic MySQL View
Solution to querying garbled characters in MySQL
How to query time periods in MySql
Use MySQL temporary tables to accelerate queries
How to view MySQL binary logs