Removing users
In the Revoking permissions section given previously in this chapter, there is an example for removing all the privileges of a user, but this doesn't actually remove the user. To remove a user completely, we use the DROP USER
statement. It has the following pattern:
DROP USER <user>;
The following is an example of this:
DROP USER 'tom'@'%';
When a user is dropped, all permissions are automatically removed as well.
Note
Complete documentation of the DROP USER
statement is available at the following location: